【发布时间】:2013-04-03 12:47:30
【问题描述】:
如何导入和导出 webdriver FireFox 配置文件?
我想做的事情是这样的:
from selenium import webdriver
#here I want to import the FF profile from a path
if profile:
driver = webdriver.Firefox(profile)
else:
#this is the way I get the WebDriver currently
driver = webdriver.Firefox()
#doing stuff with driver
#Here I want to save the driver's profile
#so I could import it the next time
【问题讨论】:
-
你需要更具体。您可以加载已保存的配置文件,或通过 Firefox 配置文件对象即时创建一个配置文件,但“配置文件存在”的含义过于模糊,无法在没有更多上下文的情况下提供任何有意义的答案。你是如何创建它的?它存储在哪里以及如何存储?
-
我改进了问题,感谢您的建议