gpt4 book ai didi

selenium-webdriver - 获取 selenium 错误 - 使用 chrome 驱动程序版本 2.20.x 断开连接 : received Inspector. 分离事件

转载 作者:行者123 更新时间:2023-12-05 03:11:43 24 4
gpt4 key购买 nike

当我的脚本在打开登录页面后尝试为用户名发送 key 时,我断开了连接:收到 Inspector.detached 事件错误。

enter image description here

控制台详细信息:

SaveReport FAILED: SaveSearche org.openqa.selenium.WebDriverException: disconnected: received Inspector.detached event (Session info: chrome=49.0.2623.110) (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 334 milliseconds Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03' System info: host: 'jp-anal-l01', ip: '182.178.5.177', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79' Session ID: b963137ae8a484c47efd3ac0984ea6b3 Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\ANJH1.NA\Temp\dir10584}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=49.0.2623.110, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, hasTouchScreen=false, applicationCacheEnabled=false, takesScreenshot=true}] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268) at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:89) at com.demoProject.loginAllTime(TestSuiteTestCases.java:99) at com.demoProject.TestCases.SaveSearch(TestSuiteTestCases.java:317) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at [snip] at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) [snip] org.testng.TestNG.run(TestNG.java:1057) at com.demoProject.executeTestCase(TestSuiteTestCases.java:99) at com.demoProject.initialize(TestSuiteTestCases.java:56) at com.demoProject.executeModules(TestSuiteTestCases.java:142) at com.demoProject.main(TestSuiteTestCases.java:98)

最佳答案

在没有实际测试代码的情况下,我最好的猜测是调用 sendKeys()com.demoProject.loginAllTime() 必须发送 Ctrl-Shift-I,或Ctrl-Shift-J,或 Ctrl-Shift-C,每一个都将 open the Chrome DevTools在 Windows 上。

如评论中所述,如果在 WebDriver 运行期间打开 DevTools,ChromeDriver will be automatically disconnected ,产生错误:

received Inspector.detached event

似乎不可能以任何其他方式得到该错误。

关于selenium-webdriver - 获取 selenium 错误 - 使用 chrome 驱动程序版本 2.20.x 断开连接 : received Inspector. 分离事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36292259/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com