草庐IT

DevToolsActivePort

全部标签

java - Webdriver 和 Chrome : DevToolsActivePort file doesn't exist

我正在尝试安装/配置Selenium以在团队成员不在办公室时进行一些UI测试。我已经安装了SeleniumWebdriver和Eclipse,以及Chrome、Firefox和Edge浏览器驱动程序。我有一些非常简单的脚本可以启动浏览器并打开一个URL。我只是想验证我的安装和配置是否正确。Firefox和Edge都很好,按预期工作。但是,我无法让chrome正常工作。这是我的脚本:packagefirstPackage;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.chrome.ChromeDriver;im

Java selenium错误——DevToolsActivePort file doesn‘t exist

文章目录Javaselenium错误——DevToolsActivePortfiledoesn'texist1.问题出现2.问题原因3.问题处理4.附Javaselenium错误——DevToolsActivePortfiledoesn’texist1.问题出现项目:xxxx,抓取热点新闻截图环境:linux-centos:7.6GoogleChrome109.0.5414.74ChromeDriver109.0.5414.74在Java项目中,使用selenium模拟谷歌浏览器打开系统页面,进行截图,在windows环境下运行都没有问题,可是部署到生成环境后,运行报错。报错信息:2023-0

迁移selenium脚本迁移后出现unknown error: DevToolsActivePort file doesn‘t exis

迁移selenium脚本到其他服务器执行时出现以下错误:File"/data/app/jenkins/workspace/check-page/.venv/lib/python3.7/site-packages/fastapi/applications.py",line199,in__call__awaitsuper().__call__(scope,receive,send)File"/data/app/jenkins/workspace/check-page/.venv/lib/python3.7/site-packages/starlette/applications.py",line1

selenium同时打开多个 chromedriver对象时候 unknown error: DevToolsActivePort file doesn‘t exist

第一个正常,第二个就提示(unknownerror:DevToolsActivePortfiledoesn'texist)根据StackOverflow所介绍的解决方案 加上 options.add_argument("--remote-debugging-port=9292")不再报unknownerror:DevToolsActivePortfiledoesn'texist,但driver.get(url)时全部都在第一个webdriver上打开,后面的窗口全部都一直是空白页面。逐行代码屏蔽调试一轮,发现问题出在user-data-dir的取值上options.add_argument(r