已经尝试过"介绍硒中的css定位器"和" css selenium选择器"但他们没有带来解决方案。使用Selenium IDE 2.91录制网页测试时,播放场景以错误结束。恕我直言,这个问题是一个按下按钮的按钮,当它悬停在按钮上时,按下或取下按钮会发生变化。在做这些事情时,div类正在改变:
<div class="gwt-PushButton A gwt-PushButton-up" tabindex="0" role="button" style="" aria-pressed="false">
到
<div....gwt-PB-up-hovering tabindex="0" role="button" style="" aria-pressed="false">
到
<div class="gwt-PushButton A gwt-PushButton-down-hovering" tabindex="0" role="button" style="" aria-pressed="true">
div中的其余html代码是:
<input tabindex="-1" role="presentation" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;" type="text">
<div class="html-face">Controle</div>
</div>
硒的记录是2条记录:
1 click //div[5]/div[2]
2 click //div[5]/div[2]/div
信息selenium给出= [info]执行:| click | // div [5] / div [2] | |但因为按钮不是真正点击下一步进入 错误。
有关如何制作硒的任何建议点击按钮?
已尝试点击css=div.gwt-PushButton.GBKHVCADO2