51Testing软件测试论坛

标题: 用ruby,如何定位imagebutton并且点击它? [打印本页]

作者: cjq_999    时间: 2008-7-11 09:10
标题: 用ruby,如何定位imagebutton并且点击它?
button对应的代码如下:
<image class="imageButton" border="0" onclick="addActivities()" name="adding" src="images/add_set.gif"/>
1. 如何判断这个button在页面上存在?
2. 如何才能点击这个button?

谢谢
作者: cjq_999    时间: 2008-7-12 20:58
标题: 回复 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!
作者: chech28    时间: 2008-7-14 09:36
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




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2