在 QAF 中开始任何场景之前,我在控制台中收到以下错误。可能的原因是什么?
Caused by: org.openqa.selenium.JavascriptException: javascript error: comment is not defined
(Session info: chrome=77.0.3865.120)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: '3c9bccada919', ip: '172.17.0.4', os.name: 'Linux', os.arch: 'amd64', os.version:
'4.14.123-86.109.amzn1.x86_64', java.version: '11.0.2'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 77.0.3865.120, chrome:
{chromedriverVersion: 77.0.3865.10 (bc3579f611bbc..., userDataDir: C:\Users\Perfecto\AppData\L...},
goog:chromeOptions: {debuggerAddress: localhost:50292}, javascriptEnabled: true,
networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy:
Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad:
300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: 89a66f7cbf6a3e9fc5763142f0ccbfcf
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'WXVMSDEV0115', ip: '10.212.180.83', os.name: 'Windows 10', os.arch: 'amd64',
os.version: '10.0', java.version: '1.8.0_181'
Driver info: driver.version: EventFiringWebDriver
at jdk.internal.reflect.GeneratedConstructorAccessor187.newInstance(Unknown Source)
at
jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:537)
at com.perfecto.wfa.server.selenium.remote.server.perfecto.WebiumDriver$30.call(WebiumDriver.java:1034)
at com.perfecto.wfa.server.selenium.remote.server.perfecto.WebiumExecutor.execute(WebiumExecutor.java:86)
at com.perfecto.wfa.server.selenium.remote.server.perfecto.WebiumDriver.executeScript(WebiumDriver.java:1027)
at jdk.internal.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:108)
at com.sun.proxy.$Proxy139.executeScript(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:221)
at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:112)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:191)
at com.perfecto.wfa.server.servlets.SeleniumServlet.lambda$handleRequest$0(SeleniumServlet.java:145)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:834)
附加我用来运行测试的 XML。我正在使用最新版本的量子进行此测试。想知道失败的原因。
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="OLB SmokeTest" verbose="0" parallel="tests" thread-count="4">
<listeners>
<listener class-name="com.clientSample.webUtils.TestNGListener" />
</listeners>
<test name="chrome Test" enabled="true" parallel="instances" thread-count="2">
<parameter name="perfecto.capabilities.platformName" value="Windows"></parameter>
<parameter name="perfecto.capabilities.platformVersion" value="10"></parameter>
<parameter name="perfecto.capabilities.browserName" value="Chrome"></parameter>
<parameter name="perfecto.capabilities.browserVersion" value="77"></parameter>
<parameter name="perfecto.capabilities.resolution" value="1280x1024"></parameter>
<parameter name="perfecto.capabilities.location" value="US East"></parameter>
<parameter name="perfecto.capabilities.deviceType" value="Web"></parameter>
<parameter name="env.resources" value="src/main/resources/common" />
<parameter name="remote.server"
value="https://XXX.perfectomobile.com/nexperience/perfectomobile/wd/hub/fast" />
<groups>
<run>
<include name="@SmokeTest_AM_OB"/>
<exclude name="@Exclude_Web"/>
</run>
</groups>
<classes>
<class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
</classes>
</test>
</suite>