单击图像进行机械化
问题描述:
使用mechainze单击文本agent.click(page.link_with(:text => 'some_text')
真是小菜一碟.如何使用机械化单击图像?
clicking a text agent.click(page.link_with(:text => 'some_text')
with mechainze is piece of cake. How to click an image with mechanize?
答
它非常相似.您只需要获取图像的属性之一即可.看看下面..:
It is rather similar. You just need to grab one of the attributes of your image. have a look below..:
agent.click(page.image_with(:alt=> 'your image')