html:<input name="okBtn" class="sbttn" onclick="return okSendMsg();" type="button" value = "登记”>javascript:function okSendMsg(){alert('登记')}使用selenium rcselenium.click("name=okBtn");Thread.sleep(2000);if(selenium.isAlertPresent()){selenium.getAlert();}selenium.isAlertPresent()得到的永远是false,获取不到alert
添加回答
举报
0/150
提交
取消