Using the default firefox profile with selenium webdriver in python

后端 未结 2 1274
深忆病人
深忆病人 2020-12-17 00:17

I know similar questions have been asked before, but I\'ve tried many times and it still doesn\'t work for me.

I only have a default profile in firefox (called c1r3g

相关标签:
2条回答
  • 2020-12-17 00:39

    Moreover, you can use double backslashes in the path:

    fp = webdriver.FirefoxProfile('C:\\Users\\admin\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\c1r3g2wi.default')
    browser = webdriver.Firefox(fp)
    
    0 讨论(0)
  • 2020-12-17 00:47

    Ok, I just solved this by simply changing all the slashes in my file path from "\" to "/". Never knew this would make a difference.

    C:/Users/admin/AppData/Roaming/Mozilla/Firefox/Profiles/c1r3g2wi.default
    
    0 讨论(0)
提交回复
热议问题