Creating Loops in selenium IDE

View previous topic View next topic Go down

Creating Loops in selenium IDE

Post by a71688 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.

a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: Creating Loops in selenium IDE

Post by ccox 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

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Creating Loops in selenium IDE

Post by a71688 on Fri Aug 08, 2014 12:14 am

Thanks helped a lot and it worked like a charm Smile

a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: Creating Loops in selenium IDE

Post by Sponsored content Today at 2:56 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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