在Windows Service Jenkins节点中运行Selenium

时间:2018-10-31 11:40:07

标签: selenium jenkins selenium-webdriver

我一直在使用以下启动模式的节点在jenkins中运行硒测试:通过webstart启动代理。当我手动将节点连接到jenkins时,一切正常。

我将连接安装为Windows服务,这就是问题开始的地方。当我在Chrome中启动硒测试时,出现以下错误日志:

org.openqa.selenium.WebDriverException:未知错误:无法发现打开的页面   (驱动程序信息:chromedriver = 2.42.591088(7b2b2dca23cca0862f674758c9a3933e685c27d5),platform = Windows NT 10.0.17134 x86_64)(警告:服务器未提供任何堆栈跟踪信息) 命令持续时间或超时:61.65秒 生成信息:版本:'3.14.0',修订版本:'aacccce0',时间:'2018-08-02T20:05:20.749Z' 系统信息:主机:'MSEDGEWIN10',ip:'172.17.5.202',操作系统名称:'Windows 10',os.arch:'amd64',os.version:'10 .0',java.version:'1.8.0_181 ' 驱动程序信息:driver.version:ChromeDriver     在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)处     在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     在java.lang.reflect.Constructor.newInstance(Constructor.java:423)     在org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)     在org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)     在org.openqa.selenium.remote.JsonWireProtocolResponse.lambda $ new $ 0(JsonWireProtocolResponse.java:53)     在org.openqa.selenium.remote.JsonWireProtocolResponse.lambda $ getResponseFunction $ 2(JsonWireProtocolResponse.java:91)     在org.openqa.selenium.remote.ProtocolHandshake.lambda $ createSession $ 0(ProtocolHandshake.java:122)     在java.util.stream.ReferencePipeline $ 3 $ 1.accept(ReferencePipeline.java:193)     在java.util.Spliterators $ ArraySpliterator.tryAdvance(Spliterators.java:958)     在java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)     在java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)     在java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)     在java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)     在java.util.stream.FindOps $ FindOp.evaluateSequential(FindOps.java:152)     在java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)     在java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)     在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:125)     在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)     在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)     在org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)     在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)     在org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)     在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:130)     在org.openqa.selenium.chrome.ChromeDriver。(ChromeDriver.java:181)     在org.openqa.selenium.chrome.ChromeDriver。(ChromeDriver.java:168)     在org.openqa.selenium.chrome.ChromeDriver。(ChromeDriver.java:157)     在com.wiris.webtester.WebPage。(WebPage.java:136)     在com.wiris.webtester.Context.initBrowser(Context.java:288)     在com.wiris.webtester.Context.maximizeBrowser(Context.java:322)     在com.wiris.webtester.action.browser.BrowseAction.executeBaseAction(BrowseAction.java:37)     在com.wiris.webtester.action.BaseAction.execute(BaseAction.java:35)     在com.wiris.webtester.action.TestAction.test(TestAction.java:94)     在com.wiris.util.test.TestFile.test(TestFile.java:48)     在com.wiris.util.test.TestList.executeFiltered(TestList.java:191)     在com.wiris.util.test.TestList.execute(TestList.java:142)     在com.wiris.webtester.TesterMain.run(TesterMain.java:222)     在com.wiris.webtester.TesterMain.main(TesterMain.java:275)     在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处     在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)     在org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:221)     在org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:154)     在org.apache.tools.ant.taskdefs.Java.run(Java.java:834)     在org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:228)     在org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:137)     在org.apache.tools.ant.taskdefs.Java.execute(Java.java:110)     在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)     在sun.reflect.GeneratedMethodAccessor4.invoke(未知来源)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     在org.apache.tools.ant.Task.perform(Task.java:348)     在org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)     在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)     在sun.reflect.GeneratedMethodAccessor4.invoke(未知来源)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     在org.apache.tools.ant.Task.perform(Task.java:348)     在org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:402)     在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)     在sun.reflect.GeneratedMethodAccessor4.invoke(未知来源)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     在org.apache.tools.ant.Task.perform(Task.java:348)     在org.apache.tools.ant.Target.execute(Target.java:435)     在org.apache.tools.ant.Target.performTasks(Target.java:456)     在org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)     在org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)     在org.apache.tools.ant.Project.executeTargets(Project.java:1260)     在org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)     在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)     在sun.reflect.GeneratedMethodAccessor4.invoke(未知来源)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     在org.apache.tools.ant.Task.perform(Task.java:348)     在org.apache.tools.ant.Target.execute(Target.java:435)     在org.apache.tools.ant.Target.performTasks(Target.java:456)     在org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)     在org.apache.tools.ant.Project.executeTarget(Project.java:1376)     在org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)     在org.apache.tools.ant.Project.executeTargets(Project.java:1260)     在org.apache.tools.ant.Main.runBuild(Main.java:857)     在org.apache.tools.ant.Main.startAnt(Main.java:236)     在org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)     在org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)

其他有用信息:

Chrome版本: 69.0.3497.100

chromedriver版本: 2.42.591088

该服务运行时以本地系统帐户登录,并且选中了允许服务与桌面交互复选框。我已经尝试指定一个管理员帐户,但遇到相同的错误。

谢谢! :)

0 个答案:

没有答案