分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

webDriver timeout waiting for driver...

发布时间:2023-09-06 02:20责任编辑:白小东关键词:暂无标签
最近使用phantomjs时,遇到如下问题

java.lang.ExceptionInInitializerError ???at be.axians.actemium.milter.helper.BrowserTestParent.openBrowser(BrowserTestParent.java:32) ???at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ???... ???at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) ???at java.lang.Thread.run(Thread.java:748)Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.Build info: version: ‘3.4.0‘, revision: ‘unknown‘, time: ‘unknown‘System info: host: ‘runner-5408090a-project-349-concurrent-0dtvl2‘, ip: ‘10.131.1.51‘, os.name: ‘Linux‘, os.arch: ‘amd64‘, os.version: ‘3.10.0-514.26.1.el7.x86_64‘, java.version: ‘1.8.0_131‘Driver info: driver.version: PhantomJSDriver ???at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:193) ???at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:181) ???at org.openqa.selenium.phantomjs.PhantomJSCommandExecutor.execute(PhantomJSCommandExecutor.java:78) ???at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637) ???at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250) ???at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236) ???at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137) ???at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:116) ???at be.axians.actemium.milter.helper.WebDriverManager.<clinit>(WebDriverManager.java:53) ???... 52 moreCaused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:7465/status] to be available after 20001 ms ???at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107) ???at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:190) ???... 60 moreCaused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException ???at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:140) ???at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80) ???... 61 moreCaused by: java.util.concurrent.TimeoutException ???at java.util.concurrent.FutureTask.get(FutureTask.java:205) ???at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:128) ???... 62 more

本部分代码在Windows下运行正常,mac下运行也是正常的.只有在docker container上出现问题.

经过搜索 解决方案如下

yum install -y libfontconfig1 fontconfig libfontconfig1-dev libfreetype6-dev

安装了phantomjs 的一个隐藏依赖.

webDriver timeout waiting for driver...

原文地址:http://blog.51cto.com/8745668/2310507

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved