Go down
Posts : 2
Join date : 2014-03-24

Selecting JTree items Empty Selecting JTree items

on Wed Mar 26, 2014 3:51 pm
I'm after a little help with trying to get IDE to select changing JTree items within a content management system. 

The scenario; Register for a members area via a form, capture the information within the members section of the CMS. There are duplicate checking constraints on the information being passed through. 

Populating the form is fine, using a .js file to randomly generate First/ Last name information along with email address to avoid the duplicate checking each time the test runs. Navigation within the CMS is ok, but this is where i'm becoming a little stuck. 

Once you pass through the form in captures the information within a members area, with the section being a JTree. We have A-Z folders where the members emails are stored alphabetically ~ A(at)Test.(com) would fall within the A folder and X(at)Test.(com) would fall in the X folder. 

So, navigating to relevant folder each time isn't a problem as my randomly generated email address will always start with an 'X' so i know where they will be stored (within the X folder). However, i need selenium IDE to navigate to the relevant record based on the email address in order to validate the captured information matches those that have been passed through ~ this is where i'm having the issues. 

The email input ~ type | id=Email | javascript{"Q" + Math.floor(Math.random()*11111) + "(at)companyname.org.(com)";}
I then capture this generated email ~ storeText | id=Email | EmailAddress

Do some bits and pass through the form.

Within CMS my script looks something like:

Open | /members
Navigate to the members area and the relevant file i'm expecting the email address to appear under

When using a record already captured to either assert or verifyText IDE captures:

assertText | //li[@id='Q1025(at)companyname.org.(com)']/a/div | Q1025(at)companyname.org.(com)

Or to select:

click | //li[@id='Q1025(at)companyname.(com). com']/a/div | Q1025(at)companyname.org.(com)

Now if this email address is randomly generated, yet will always have 'Q' at the start and then '(at)companyname.org.(com)' how can I make IDE select the record i want based on the email passed through in the registration steps?? I've tried putting in ${EmailAddress} to my steps, but not picking it up....
Posts : 205
Join date : 2012-01-06
Age : 34
Location : Denver, CO

Selecting JTree items Empty Re: Selecting JTree items

on Thu Mar 27, 2014 10:02 am
what does storeText return? Have you tried storeValue?
Back to top
Permissions in this forum:
You cannot reply to topics in this forum