首页 > 解决方案 > 自动化打开的 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参数,但我还没有找到怎么做

标签: pythonseleniumselenium-firefoxdriver

解决方案


推荐阅读