【发布时间】:2024-04-30 21:20:02
【问题描述】:
我正在尝试使用以下命令使用 selenium 独立启动 chrome
java -Dwebdriver.chrome.driver=chromedriver-new.exe -jar selenium-server.jar standalone --host 127.0.0.1 --port 4444
但是,当我触发 Chrome 的 webdriverio 测试时,它会暂时打开 chrome,然后崩溃并出现以下错误
{"traceId": "faca75a3db657eed4b96bdac93977746","eventTime": 1637343152240678600,"eventName": "exception","attributes": {"driver.url": "http:\u002f\u002flocalhost:57786","exception .message": "创建与驱动程序服务的会话时出错。停止驱动程序服务:无法启动新会话。响应代码 500。消息:会话未创建\n从选项卡崩溃\n(会话信息:chrome=96.0.4664.45) \n构建信息:版本:'4.0.0',修订:'3a21814679'\n系统信息:主机:'',ip:'192.168.0.11',os.name:'Windows 10',os.arch:'x86' , os.version: '10.0', java.version: '1.8.0_311'\n驱动程序信息: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: 无法启动新会话. 响应代码 500。消息:会话未创建\n从选项卡崩溃\n(会话信息:chrome=96.0.4664.45)\n构建信息:版本:'4.0.0',修订:'3a21814679'\n系统信息:主机:' ',ip:'192.168.0.11',os.name:'Windows 10',os.arch:'x86',os.version:'10.0',jav a.version: '1.8.0_311'\n驱动信息: driver.version: unknown\r\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)\r\n\tat org. openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:84)\r\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:62)\r\n\tat org.openqa。 selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:131)\r\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:65)\r\n \tat org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:143)\r\n\tat org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java: 315)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:513)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor。 newSession(LocalDistributor.java:440)\r\n\tat org.openqa.selenium.grid.distrib utor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:648)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:612)\ r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.lang.Thread .run(Unknown Source)\r\n","exception.type": "org.openqa.selenium.SessionNotCreatedException","logger": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory","session .capabilities": "{"acceptInsecureCerts": true,"browserName": "chrome","goog:chromeOptions": {"args": [ "--disable-gpu" ] } }\n"}}
【问题讨论】:
标签: selenium webdriver-io