HOW TO USE GOTOLABEL COMMAND IN SELENIUM IDE?




Run the below script in selenium IDE:

Command
Target
Value
storing a search key as variable


store
1
x
gotolabel
Test1

storeEval
alert('Test can’t be run!!')

test script started from here


label
Test1

while
(${x}<10)

echo
${x}

open
/
focus
//input[@id='gbqfq']

type
//input[@id='gbqfq']
${x}
focus
//button[@id='gbqfb']

clickAndWait
//button[@id='gbqfb']

storeEval
storedVars['x'] = ${x}+1

endWhile


test script ended from here


storeEval
alert('Test executed successfully!!')

* Base URL:
http://www.google.co.in/






In the above script we are using gotolabel command to run the script directly from defined label “Test1”. 
Because of gotolabel command, storeEval command in fourth row has been skipped from the execution of script.

Read more about LABEL COMMAND IN SELENIUM IDE USING FLOW CONTROL EXTENSION.

Read more about GOTOLABEL COMMAND IN SELENIUM IDE USING FLOW CONTROL EXTENSION.





Post a Comment

0 Comments