我有一个id的链接:
<a href="#" onclick="return false();" id="lol">
在我的测试中:
selenium.click("lol"); //when running the test, the click will just end up selecting the item, not firing off the frameworks javascript
这和注册点击不一样!javascript是复杂框架的一部分,它将导致div弹出。这在firefox中有效。
但这确实起到了修复作用:
selenium.click("lol"); //when running the test, the click will just end up selecting the item, not firing off the frameworks javascript
selenium.keyPress("lol", "\\13"); //press enter key, since the click ended up selecting it
修复确实有效。但是,这里发生了什么?好像是硒。click()!=[实际浏览器单击事件]。有谁能帮忙解释一下这些内部工作原理吗?