[Wtr-general] how to access an element whose html tag is <A>

Paul Carvalho tester.paul at gmail.com
Tue Dec 12 09:37:41 EST 2006


Unless I'm mistaken, <A HREF..> Click Here </A> is a link.  Did you try the
ie.link method?



On 11/12/06, vijay <forum-watir-users at openqa.org> wrote:
>
> Hello people,
>
> I do not know how to access an element whose html tag is <A>.  There is a
> link, named 'Step 1. Details'.  According to its View Source, it is present
> in the following hierachy:
>
> frame -> form -> div -> table and then that element but its html shows as
> <A class = tab_enabled href = javascript:formSubmit('summary');).
>
> I want to know whether this element is enabled or disabled and want to
> click it, if enabled.
>
> Similarly, there are six other elements, 'Step 2. Details', 'Step 3.
> Contacts' etc.  These elements will be disabled at the start.  I want to
> confirm that.  How do I do these two things?
>
> I tried a command, "if ie.frame("Detail").form(:name,"header").div(:id,"header").table(:id,"cIDFTabstripTable").element(:text,/Contacts/).enabled?  ==
> true then ....",  but Watir says "undefined method `element' for
> #<Watir::Table:0x2ea6058>"
>
> Thanks, in Advance.
> Vijay
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061212/8d662c03/attachment.html 


More information about the Wtr-general mailing list