我无法在Selenium Web驱动程序上使用保存的配置文件

时间:2019-09-08 16:43:33

标签: python selenium selenium-webdriver

我使用python硒Web驱动程序进行自动化。我需要保存配置文件并重新打开它,我需要使用网站上的登录数据。但是我无法设置个人资料。

我已经尝试使用本教程来保存个人资料this 我以前使用chromedriver。但还是一样,所以现在请尝试使用geckodriver

    fp = webdriver.FirefoxProfile(os.path.join(PROFILES_DIR,'profile1'))
    browser = webdriver.Firefox(firefox_profile=fp)
    print(browser.firefox_profile.path)// it says /tmp/tmp3nwygvvo/webdriver-py-profilecopy

我希望结果是我定义的配置文件目录

0 个答案:

没有答案