51Testing软件测试论坛
标题:
selenium获取页面元素问题-求助
[打印本页]
作者:
yanzeng1495
时间:
2015-12-21 17:09
标题:
selenium获取页面元素问题-求助
运行时能获取到元素,但是调用click()方法。报错
Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: Element not found in the cache - perhaps the page has changed since it was looked up
Command duration or timeout: 9 milliseconds
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 02:56:46'
System info: host: 'PC-20151113KOVZ', ip: '192.168.1.115', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
作者:
@吕小布
时间:
2015-12-21 17:14
增加等待时间,等待页面加载完了再调用click()。
作者:
yanzeng1495
时间:
2015-12-21 17:20
已经加了页面等待时间,在click()前 , 调用了isDisplayed()方法检查界面元素是存在的。
作者:
@吕小布
时间:
2015-12-21 17:23
元素的状态能否click()?
作者:
yanzeng1495
时间:
2015-12-21 17:28
可以的。
作者:
yanzeng1495
时间:
2015-12-21 17:53
能click
作者:
yanzeng1495
时间:
2015-12-21 18:04
能click。
作者:
fhhh_eyou
时间:
2015-12-21 18:13
Command duration or timeout: 9 milliseconds
调用方法错误,超时
作者:
yanzeng1495
时间:
2015-12-22 11:19
就是实现点击连接,数据能提交成功。
如果是方法错误了,需要调用什么方法。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2