Share
Go down
popsha
Amateur
Amateur
Posts : 60
Join date : 2012-04-14

how to use while statement in ide

on Wed May 02, 2012 11:01 am
consider there are three text fields and two drop down box consist of 'YES' an 'NO' options.

first text field is to be filled manually.(assume text as 'name')
condition is that, when the two drop down is 'YES' then the other two button are filled with the same text ie 'name'
if any one of the drop down is 'NO' then that text field is to be entered manually.

can anyone suggest me solution using the user-extentions
while, gotoif,

Thanks in advance.
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: how to use while statement in ide

on Wed May 02, 2012 10:17 pm
Hopefully I have this somewhat accurate.
What I would do is use the storeValue command to store the "name" field and the two drop downs. Then using gotoIf, evaluate if drop down1==Yes && drop down2==Yes. If that gotoIf function is true(scenario 1), then send it to a label to populate the other fields with the stored "name".
If the condition is not satisfied(scenario 2), you can go to the end of the script. You could even take it a step further using storeEval and display a prompt to type in the "name" within Selenium to fill in the two blank fields.

Let me know if you have any questions.

-Cameron

TurtleRock
Posts : 8
Join date : 2012-05-16

Re: how to use while statement in ide

on Wed May 16, 2012 11:30 pm
How do we use gotoIf command, this command is not in command LOVs of my selenium IDE.
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: how to use while statement in ide

on Wed May 16, 2012 11:55 pm
You have to extend Selenium IDE with the user-extension.js file to have access to these commands. http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html

Read up on this and let me know if you have questions.
Sponsored content

Re: how to use while statement in ide

Back to top
Permissions in this forum:
You cannot reply to topics in this forum