运行Selenium WebDriver 2.37.1
我在运行测试时遇到间歇性问题并收到以下错误:
org.openqa.selenium.NoSuchElementException: no such element
Run Code Online (Sandbox Code Playgroud)
有时测试会通过,大部分时间都会失败.下面是堆栈跟踪:
org.openqa.selenium.NoSuchElementException: no such element
(Session info: chrome=31.0.1650.57)
(Driver info:
chromedriver=2.6.232923,platform=Windows NT 6.1 SP1 x86_64)
(WARNING:
The server did not provide any stacktrace information)
Command duration or timeout: 10.04 seconds
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
Build info:
version: '2.34.0', revision:
'11cd0ef93615408e0b6b3bfa28defe125906461a', time: '2013-08-06
11:43:14'
System info: os.name: 'Windows 7', os.arch: 'amd64',
os.version: '6.1', java.version: '1.7.0_45'
Session ID:
2375dca8adea8bb6962b0c87861cdd59
Driver info:
org.openqa.selenium.chrome.ChromeDriver
Capabilities
Run Code Online (Sandbox Code Playgroud)
以下是我执行测试的代码:
@Test
public void loginPage(){
chrome.get("http://thisisafakeurl.com");
//entering …Run Code Online (Sandbox Code Playgroud)