我正在尝试点击像[//div[24]/div/div/div/table/tbody/tr/td[3]/div/div[2]/div[2]/div[5]/div/div]这样的div ..虽然selenium通过verifyElementPresent和xPath在xPath finder中验证了这个div,但是selenium的点击功能并没有点击它。
selenium打开一个页面,单击customers链接,脚本生成所有客户,然后单击Details,脚本生成详细页面。在那里我必须点击上面提到的div (实际上是保存按钮)…有什么解决方案吗?
发布于 2011-10-19 17:28:21
尝试runScript并使用javascript触发单击事件,例如,如果您在测试的脚本上使用了jQuery
<!--fire awkward click event-->
<tr>
<td>runScript</td>
<td>$('.bo-selector').click();</td>
<td></td>
</tr>https://stackoverflow.com/questions/7811104
复制相似问题