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

Creating Loops in selenium IDE

on 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.
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: Creating Loops in selenium IDE

on 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
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Re: Creating Loops in selenium IDE

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

Re: Creating Loops in selenium IDE

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