<a onkeypress="if(event.keyCode == 13 || event.which == 13){ClientReportRpt…_ctl02.ActionHandler('Toggle','118iT0R0R0x1');}return false;" onclick="ClientReportRptMain_ctl02.ActionHandler('Toggle','118iT0R0R0x1');return false;" style="cursor:pointer;" tabindex="4">
<img border="0" alt="+" src="/SIMS/Reserved.ReportViewerWebControl.axd?ReportSession=cfsd…Type=ReportImage&ResourceStreamID=10.50.4000.0TogglePlus.gif">
</img>
</a>
这是代码的一部分,网页上有许多类似的图像,其中值“118iT0R0R0x1”和tab index=“4”对于相同图像在网页中的不同位置不是常量。 我在python绑定中使用Selenium。任何帮助都将不胜感激。谢谢:)
锚点有“onclick”处理程序,而不是图像。你需要“点击”锚。你知道吗
其中
anchor_element
自我解释。要查找定位元素,请执行以下操作:http://selenium-python.readthedocs.org/locating-elements.html
我不能说更多,因为您的代码片段只包含两个元素。为了找到正确的元素,我必须知道更多关于哪些元素是你在寻找。。。你知道吗
相关问题 更多 >
编程相关推荐