[Wtr-general] custom attributes
Prema Arya
prema.arya at gmail.com
Mon Jan 29 03:19:06 EST 2007
Hi Paul,
You can use xpath to address the elements having custom attributes.
For example, to access the following input tag
<input type="text" name="aa" mytag="paul">
using xpath the code would look like this:
inText = ie.text_field(:xpath , "//input[@mytag='paul']/")
puts inText
Regards,
Prema
On 1/29/07, Paul Rogers <paul.rogers at shaw.ca> wrote:
>
>
> Some one asked me off list if they could access the mytag part of some
> html like the following
>
> <input type = text name = aa mytag=paul>
>
> With the 1.5.1-1145 gem you can do this:
>
> puts ie.text_field(:index,1).ole_object.mytag
> returns 'paul'
>
>
> this doesnt seem to work though:
>
> ie.text_field(:mytag ,/p/).flash
> causes a MissingWayOfFindingObjectException
>
> Hope that helps others too.
>
> Paul
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Prema Arya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/e7d8266c/attachment.html
More information about the Wtr-general
mailing list