单击图像进行机械化 [英] Clicking image with mechanize

查看:76
本文介绍了单击图像进行机械化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用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')

这篇关于单击图像进行机械化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆