Hi Roy.
I think for this case you require multiple parameter to recognzie one
object. This option is supported in WET.
In WET the syntax would by like this.
Browser("title:=.....").Button("alt:=Delete Asset", "id:=....",
"index:=1").click
I think this should solve your issue.
Regards
Sathya
Roy Sin wrote:
>thanks for the suggestion this will work if there was only
>one image with alt text "Delete Asset". But I have more
>than one images with the same alt text, the only thing that
>differentiate them is the dynamically generated id, that is
>why I'm trying to pass the id. Could I pass the id in the
>onclick in the fire_event method?
>
>
>--- amol deshpande <[EMAIL PROTECTED]> wrote:
>
>
>
>>Hi,
>>try and use the alt attribute.
>>$ie.frame("main").image(:alt,"Delete
>>Asset").fire_event("onclick")
>>AD
>>
>>--- Roy Sin <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>>Hi All
>>>
>>>I have an image tag like:
>>><IMG onclick=rusure(1334) alt="Delete Asset"
>>>src="/brand/default/portal/images/del.gif" border=0>
>>>
>>>I tried the following where the variable $theid is
>>>1334
>>>from
>>>above but
>>>
>>>$ie.frame("main").image(:text,
>>>/onclick=rusure(#{$theid})/).click
>>>
>>>but i get the error
>>>Watir::Exception::UnknownObjectException: Unable to
>>>locate
>>>object, using text and (?-mix:onclick=rusure(1334))
>>>
>>>thanks in advance for any help on that.
>>>
>>>
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Yahoo! Mail - PC Magazine Editors' Choice 2005
>>>http://mail.yahoo.com
>>>_______________________________________________
>>>Wtr-general mailing list
>>>[email protected]
>>>http://rubyforge.org/mailman/listinfo/wtr-general
>>>
>>>
>>>
>>No Body Has ever Collided With The Sky...So Sky Is The
>>Limit!
>>
>>
>>
>>__________________________________
>>Yahoo! FareChase: Search multiple travel sites in one
>>click.
>>http://farechase.yahoo.com
>>_______________________________________________
>>Wtr-general mailing list
>>[email protected]
>>http://rubyforge.org/mailman/listinfo/wtr-general
>>
>>
>>
>
>
>
>
>
>__________________________________
>Yahoo! Mail - PC Magazine Editors' Choice 2005
>http://mail.yahoo.com
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
--
Sathya Shankar M G
Software Testing Engineer
Qantom Software
http://www.qantom.com
Ph : 26799269 Xtn. 123
sip : [EMAIL PROTECTED]
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general