在Teamcity中运行期间,Selenium Webdriver测试失败

时间:2016-10-27 11:53:24

标签: java selenium teamcity

现在我遇到以下情况。 Intellij Idea(TestNG)中的代码:

WebDriverWait waitButton = new WebDriverWait(driver,30); - 通过 waitButton.until(ExpectedConditions.elementToBeClickable(By.id(" UpdateResults&#34))); - 通过 driver.findElement(By.id(" UpdateResults&#34))。单击(); - 通过

在Teamcity中运行相同的代码:

WebDriverWait waitButton = new WebDriverWait(driver,30); - 通过 waitButton.until(ExpectedConditions.elementToBeClickable(By.id(" UpdateResults&#34))); - 通过

driver.findElement(By.id(" UpdateResults&#34))。单击(); - 失败

错误代码:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (908, 685). Other element would receive the click: <span class="glimpse-hud-data">...</span>
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 36 milliseconds
Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
System info: host: 'build', ip: '175.35.24.299', os.name: 'Windows Server 2012 R2', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_66'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf), userDataDir=C:\TeamCity\buildAgent\temp\buildTmp\scoped_dir5448_30928}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 78b116da60e2c6d2fc01993c5133905e
org.openqa.selenium.WebDriverException: 
unknown error: Element is not clickable at point (908, 685). Other element would receive the click: <span class="glimpse-hud-data">...</span>
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 36 milliseconds
Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
System info: host: 'build', ip: '175.35.24.299', os.name: 'Windows Server 2012 R2', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_66'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf), userDataDir=C:\TeamCity\buildAgent\temp\buildTmp\scoped_dir5448_30928}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=54.0.2840.71, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 78b116da60e2c6d2fc01993c5133905e
    at com.automation.webdriver.testStoryReportsNavigation.beforeClass(testStoryReportsNavigation.java:90)

这种行为可能是什么原因以及如何解决?感谢

0 个答案:

没有答案