我正在运行硒测试,并突然失误。测试运行并不是每次都一致。有时会失败,有时它会通过。它失败的步骤也没有固定,每次都在不同的步骤失败。
错误讯息: 超时异常:等待net.serenitybdd.core.pages.WebElementFacade for selenium webdriver 40秒后超时
以下是我使用的版本: Chrome - v65 Chrome驱动程序 - v2.38 硒 - v2.53 宁静 - v1.1.36
我没有编写代码,因为它没有修复它将失败的步骤。 有人可以帮忙吗?
添加错误跟踪:
<?xml version="1.0" encoding="UTF-8"?><testsuite errors="1" failures="0" name="To create project and allocate resources" skipped="0" tests="12" time="1280.85" timestamp="2018-04-117 10:22:25"><testcase name="UC_PM_01_Create Project from Template"/><testcase name="UC_PM_05_Populate PMO Data"/><testcase name="UC_PM_15_Resource Allocation"><error message="Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea' Driver info: driver.version: unknown Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea' Driver info: driver.version: unknown" type="org.openqa.selenium.TimeoutException">Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown</error><system-err>Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
Driver info: driver.version: unknown
com.org.macquarie.clarity.actions.WebActions.verifyElementIsDisplayed(WebActions.java:296)
com.org.macquarie.clarity.steps.HomeSteps.clickHomeMenuLinks(HomeSteps.java:30)
</system-err></testcase><testcase name="Uc pm 18 adding resource to team will update~rmw task"/></testsuite>
答案 0 :(得分:0)
此错误消息......
<error message="Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea' Driver info: driver.version: unknown Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea' Driver info: driver.version: unknown" type="org.openqa.selenium.TimeoutException">Timed out after 40 seconds waiting for net.serenitybdd.core.pages.WebElementFacadeImpl$1@5be052ca
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: '*', ip: '*', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0-ea'
...暗示服务员提出 TimeoutException 并且无法找到elelemt。
但是,您使用的二进制文件之间的主要问题是版本兼容性,如下所示:
因此, JDK v8u0-ea , Selenium Client v2.53.0 , Chrome v65.x 和之间明显不匹配> ChromeDriver v2.38
@Test
。