[wtr-general] Re: How to judge the button or link exists in the page?

2009-08-10 Thread yuping zhong
Yet,It works fine,thanks for all of your guys! On Aug 8, 10:14 am, Marlon Mojares marlonmoja...@gmail.com wrote: I hope this helps *if link:* begin     assert(ie.link(:name,Signout).exists?)     puts login successfully rescue = e      puts login failed + e.message + \n +

[wtr-general] Re: How to judge the button or link exists in the page?

2009-08-07 Thread Smruti Ranjan Kar
assert($browser.link(:text,Signout)exists?),The sign-out link is absent) On Fri, Aug 7, 2009 at 2:25 PM, yuping zhong littlezhong...@gmail.comwrote: Dear all, Right now, I want to use the watir to check the button or link if exists in the page. Who can help me? Such as, I write the watir

[wtr-general] Re: How to judge the button or link exists in the page?

2009-08-07 Thread Smruti Ranjan Kar
And what you need will be: assert($browser.link(:text,Signout)exists?),login failure) puts Login was successful On Fri, Aug 7, 2009 at 2:29 PM, Smruti Ranjan Kar smrutiranjan@gmail.com wrote: assert($browser.link(:text,Signout)exists?),The sign-out link is absent) On Fri, Aug 7, 2009

[wtr-general] Re: How to judge the button or link exists in the page?

2009-08-07 Thread Marlon Mojares
I hope this helps *if link:* begin assert(ie.link(:name,Signout).exists?) puts login successfully rescue = e puts login failed + e.message + \n + e.backtrace.join(\n) end *if button:* begin assert(ie.button(:name,Signout).exists?) puts login successfully rescue = e puts