Run the below script in selenium IDE:
Command | Target | Value |
storing a search key as variable | ||
store | 1 | x |
test script started from here | ||
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 the flow control to perform a while loop operation for increasing a number.
Read more about WHAT IS FLOW CONTROL?
0 Comments
What would you like to add in my list? I look forward to reading your comments below.