Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Creating Loops in selenium IDE Empty Creating Loops in selenium IDE

Wed Jul 23, 2014 12:33 am
Hi

I am new to Selenium. I have created below a simple script. If google mail fore instance is open I check that the Text '+Johnny' is present. If condtion is meet i.e. True then a verification of text is done.My question is if condition is not meet i.e. false I want script to open website and type userid and password and then do verification as if it was true.Can someone help with a simple google example as mentioned above.

Thanks and Regards

Amjad

I have attached the testcase.
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 39
Location : Denver, CO

Creating Loops in selenium IDE Empty Re: Creating Loops in selenium IDE

Thu Jul 24, 2014 11:50 pm
Where is the test case?

Do you have the user-extensions.js file so you can handle conditional statements? You will need that with the conditional info before you can do this.

I would start off by storing your text.  Then evaluate the text with the gotoIf statement

storeText | location of text |storedTextVariable

//If this condition is true it will go to the label of "happyPath"
gotoIf| storedVars['storedTextVariable']=="Johnny"| happyPath

//If false, it will continue.  This is where you would login
type|id=login| login info


//Now continue to your label where you will do the same validation as being logged in
label | happyPath
avatar
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Creating Loops in selenium IDE Empty Re: Creating Loops in selenium IDE

Fri Aug 08, 2014 12:14 am
Thanks helped a lot and it worked like a charm Smile
Sponsored content

Creating Loops in selenium IDE Empty Re: Creating Loops in selenium IDE

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