python - 自动化打开的 Firefox 浏览器 - Selenium
问题描述
我想复制我在 chrome 中所做的这个,但是在 Firefox 中
我这样打开chrome
chrome.exe --remote-debugging-port=5005 --user-data-dir=profile_path
然后使用 Python,我指出它打开的端口
chrome_options = Options()
chrome_options.debugger_address = "127.0.0.1:5005"
browser_driver = Chrome(chrome_options=chrome_options, executable_path=path_driver)
我像这样打开Firefox,但如果我像chrome一样复制,它会打开另一个Firefox浏览器
firefox.exe -start-debugger-server 5005 -profile profile_path
我想我应该添加services_args
参数,但我还没有找到怎么做
解决方案
推荐阅读
- python - 如何查看字符串中是否有任何ip
- python - 无法为大型数据集运行选择性 pandas 分析
- javascript - 我可以通过简单的基于 JavaScript 的 Web 应用程序修改 MS Word 文档吗?
- xamarin.forms - 依赖服务和媒体播放器
- python-3.x - 我使用 tkinter 在 python 3 中制作了井字游戏,但运行代码时没有任何输出,这是我第一次谢谢
- javascript - 解构内的解构
- java - Spring无法启动嵌入式tomcat服务器
- python-3.x - Kivy:如何通过向上或向下按钮保持选中的 RecycleView 列表项移动,以便进一步移动?
- reactjs - 编辑后如何在作者视图中刷新 AEM 组件?
- javafx - JavaFX 动画慢吗?