google搜索 51Testing站内搜索                    软件测试门户 | 软件测试培 训 | 文章资料精选 | 软件测试论坛 | 软件测试博客 | 测试招聘求职 
打印

[求助] 用ruby,如何定位imagebutton并且点击它?

用ruby,如何定位imagebutton并且点击它?


button对应的代码如下:
<image class="imageButton" border="0" onclick="addActivities()" name="adding" src="images/add_set.gif"/>
1. 如何判断这个button在页面上存在?
2. 如何才能点击这个button?

谢谢

TOP

回复 1# 的帖子


In fact, it is really simple, why does nobody reply it?
$ie.image(:src, /.../).click is OK!
I really think that, we can be generous!

TOP

Sorry mate, did not see your post.
But, as you have said, it's simple, isn't it? It will take you less than 5 minutes to find it out in watir API
特长与领域:
LDAP  IPv6  Ruby

TOP

 
当前时区 GMT+8, 现在时间是 2008-8-20 19:32Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹