Synchronize 2 scripts

In order for 2 tests on two different devices to synchronize or communicate with each other, they must :

  • Run the 2 GDSL scripts simultaneously

  • In each scenario, create waiting of element steps or trigger events. 

Wait for an action from the second script

To wait for an action from the other script, you need to :

  • Find an element in the interface that the actions of the second script will change (appear or disappear).

  • Watch for the arrival or disappearance of this element with a while loop that will run a maximum of 20 times.

To avoid these 20 iterations running too fast, and leaving no time for the other script to make the element appear/disappear, a pause time must be defined inside the loop.

Notice that in some applications, a page refresh may be necessary to make the expected element appear/disappear.

Example of waiting for an element, with page refresh :

while,notExists,text,textWhichShouldAppear do clickById,refresh pause,10000 done

 

Â