开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜