Tuesday 21 June 2016

Citrix protocol - ctrx_type & ctrx_key function...

ctrx_type (string) and ctrx_key (key, key modifier) 


               These two functions are the way to send keyboard data to the Citrix server. The ctrx_type function sends normal keyboard data and the ctrx_key function sends non-alphanumeric keys to the server.

                 In order to send special keyboard commands like Alt-F, ctrx_key can be used. For example, ctrx_key (“f”, MODIF_ALT) will send Alt-F to the server.



***Jain

Sunday 19 June 2016

Citrix Bitmap Synchronisation Function...!!!

ctrx_sync_on_bitmap (x, y, length, width, hash)


***This sync function is used when waiting on something other than a window to
change.

                                    A good example would be a “search” business process. Before continuing with the script, a bitmap sync could be placed in the script to make sure there were results. Inserting a bitmap sync can be done either during or after recording the script.

1. The bitmap sync button is located on the recording bar. To insert one after recording, bring up the tree view of the script. Find a line that has a screenshot of the place that needs a sync. From there, a sync_on_bitmap step can be inserted. 


The inserted step will look similar to this:

ctrx_sync_on_bitmap(449, 90, 107,
18,"9c097ec91de046c32e9b632b16125913");

The bitmap sync is one of the most difficult parts of a Citrix script to maintain. When they are used, any application changes made in the environment can potentially break the script. If the bitmap syncs stop working, there are a couple of ways to fix the script. The first is to rerecord the sync in a new script and copy the newly captured bitmap sync it into the old script in place of what is there. 


2. The second way is to find out what hash value LoadRunner is seeing at the coordinates of the bitmap. Before running the script, turn on advanced logging in the Vugen run-time settings and enable the advanced trace option. When it gets to the point of failure in the script, the LoadRunner execution log will show the expected hash value and the actual hash value of the bitmap. Copy the actual
hash value into the script and determine if the script will run. Alternatively, both bitmaps could be used in the statement by separating them with a pipe (“|”). 

An example of this would be

ctrx_sync_on_bitmap(158, 300, 312, 132,
"84e312c9701b3dbb225182ae41cdc228|571b7bccd5eb40172dbc7e79d4

61528d ");

***Jain