Watir :- click an image button?
I have am using firefox and i have modifie开发者_如何转开发d its user agent to make it behave like iphone web browser. now when i open google.com using watir and now i want to click on the searh button which is an image in mobile view. how to do that.
To click an image
<img id="logo">
try this
browser.image(:id => "logo").click
If the image is actually a button
<input type="image" id="logo">
try this
browser.button(:id => "logo").click
The next time please provide relevant HTML.
Also, take a look at HTML Elements Supported by Watir page.
精彩评论