Run the below script in selenium IDE:
Command | Target | Value |
storing a search key as variable |
|
|
store | 1 | x |
test script started from here |
|
|
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 |
|
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 |
|
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 |
|
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 |
|
echo | ${x} |
|
open | / |
|
focus | //input[@id='gbqfq'] |
|
type | //input[@id='gbqfq'] | ${x} |
focus | //button[@id='gbqfb'] |
|
clickAndWait | //button[@id='gbqfb'] |
|
test script ended from here |
|
|
storeEval | alert('Test executed successfully!!') |
|
* Base URL:
http://www.google.co.in/
In the above script we are increasing the value of x using the storeEval command.
0 Comments
What would you like to add in my list? I look forward to reading your comments below.