Share
Go down
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Help to click a link not having id

on 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
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Help to click a link not having id

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

Re: Help to click a link not having id

on 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...
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Help to click a link not having id

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

Re: Help to click a link not having id

on 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

Re: Help to click a link not having id

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