How to load firefox profile with Python Selenium?

前端 未结 5 976
囚心锁ツ
囚心锁ツ 2021-02-14 20:19

I\'m trying to get Python Selenium to work on my Windows Machine. I\'ve upgraded to the latest versions of Firefox, Selenium, Geckodriver, but I still receive the below error: <

5条回答
  •  梦如初夏
    2021-02-14 20:53

    On windows I use:

    fp = webdriver.FirefoxProfile('C:/Users/x/AppData/Roaming/Mozilla/Firefox/Profiles/some-long-string')
    driver = webdriver.Firefox(firefox_profile=fp)
    ...
    

    1 - To find the current Profile Folder, type about:support on the url field and press enter.
    2 - To see all user profiles type about:profiles on the url field and press enter.

提交回复
热议问题