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
shutey
Posts : 2
Join date : 2014-03-24

Selecting JTree items Empty Selecting JTree items

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

Selecting JTree items Empty Re: Selecting JTree items

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