the really interesting thing is that

watir 1.4   only lets you access it with a link

irb(main):006:0> ie.link(:id,'st-login-to-edit-button-link').flash
=> nil
irb(main):007:0> ie.button(:id,'st-login-to-edit-button-link').flash
Watir::Exception::UnknownObjectException: Unable to locate object, using id 
and st-login-to-edit-button-link

but 1.5.1.1158 ( thr only 1.5 I have installed right now)
works with either

irb(main):006:0> ie.button(:id,'st-login-to-edit-button-link').flash
=> nil
irb(main):007:0> ie.link(:id,'st-login-to-edit-button-link').flash
=> nil

Im going to guess that this is a bug in 1.5


Paul

----- Original Message ----- 
From: "Chris McMahon" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, May 04, 2007 9:17 AM
Subject: Re: [Wtr-general] FireWatir not finding buttons by id


> Interesting.  Watir-for-IE sees that link as a button and clicks it.
> On the page, it is the graphical element presented to the user.
> Thanks, Angrez.  (Feel free to set yourself up as a user!)
>
> On 5/4/07, Angrez Singh <[EMAIL PROTECTED]> wrote:
>> Hi Chris,
>>
>> I tried your script. I seems like you are accessing wrong element.
>>
>>
>> > #DOESN'T FIND THIS BUTTON
>> >
>> > ff.button(:id,'st-login-to-edit-button-link')
>>
>> This is actually a link <a
>> id="st-login-to-edit-button-link">.
>> So the following should be used to access this element
>> ff.link(:id, 'st-login-to-edit-button-link')
>> Using this I was able to go to login page and was able to enter login 
>> name
>> and password.
>>
>> > ff.text_field(:id, 'username').set(' [EMAIL PROTECTED]')
>> > ff.text_field(:id, 'password').set('mypass')
>> > ff.button(:value, 'Log in').click
>>
>> Don't know correct user name and password :) so was not able to go ahead
>> with the test.
>>
>> > #DOESN'T FIND THIS BUTTON EITHER
>> > ff.button(:id,"st-edit-button-link").click
>>
>> I think this might be again a link.
>>
>> Regards,
>> Angrez
>>
>> _______________________________________________
>> Wtr-general mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/wtr-general
>>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to