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
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Help to click a link not having id Empty Help to click a link not having id

Wed Jan 11, 2012 8:07 pm
Experts,

I have a link like this, Add
Recording doesn't capture the script for clicking this link. //a[text()=Add] doesn't help. Please help me to find an identifier to click this link.

Thanks,
Bhuvana
avatar
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Help to click a link not having id Empty Re: Help to click a link not having id

Wed Jan 11, 2012 9:01 pm
Message reputation : 100% (1 vote)
Try:
Code:
//a[text()='Add']
avatar
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Help to click a link not having id Empty Re: Help to click a link not having id

Mon Jan 16, 2012 11:33 am
Thanks, but it did not work for me.

It's on a new window, where I opened the new window and typed the search text that I require. Upon typing the tree gets expanded and shows the searching item(on new window). Along with the search item I get an Add(link) option. Using this syntax not able to click the Add link.

To note, all the nodes under the tree has the Add(link) option. Please throw some light...
avatar
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Help to click a link not having id Empty Re: Help to click a link not having id

Mon Jan 16, 2012 2:32 pm
If you have got more than one opened window in your app, you should choose an active window by using proper method (like selectWindow()).
avatar
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Help to click a link not having id Empty Re: Help to click a link not having id

Mon Jan 16, 2012 3:58 pm
This is how the flow goes,
1. Open a new window called add_application
2. Type an item in the search field (in the add_application window)
3. Upon typing the parent node opens to show the search item which has a link named 'Add' (note: all the child nodes are associated with a link named 'Add'.

Here the step 2 works without having to do a selectWindow(windowID) and step 3 fails to work even with the selectWindow code. Anyhow selectWindow(add_application) does not seem to work for me.
Sponsored content

Help to click a link not having id Empty Re: Help to click a link not having id

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