[wtr-general] trying to select the text from a link

2013-05-08 Thread knoll2roll
Hi guys, I am having a bit of trouble. Below is the HTML that is confusing me... a class=drill data-item-type-id=1 data-item-type=type href=# span/span Album /a This is a link on the page, and I am trying to select the link. There are a number of different links on the page so to make sure I

Re: [wtr-general] trying to select the text from a link

2013-05-08 Thread Željko Filipin
On Wed, May 8, 2013 at 12:33 PM, knoll2r...@gmail.com wrote: I have tried @b.link(:text, 'Album' Try this: browser.a(:text = /Album/).click To find out what Watir thinks the link text is, try this: browser.a(:text = /Album/).text Željko -- https://leanpub.com/watirbook -- -- Before

Re: [wtr-general] trying to select the text from a link

2013-05-08 Thread knoll2roll
Many thanks got your reply. That is awesome It works... All I had to do was change it to, @browser.a(:text = /Album/).when_present.click and it works like a dream. Never knew we could do stuff like that so really do appreciate your help. Knoll On Wednesday, 8 May 2013 11:36:36 UTC+1, Željko