【发布时间】:2015-11-27 23:50:47
【问题描述】:
每次我运行webdriver.Firefox.get('someurl)code 时,都会显示一个新的 Firefox 驱动程序,并且它不会缓存它加载的任何网页。我想让 Selenium 告诉每个加载到缓存网页的 Firefox,以便将来使用,他们不必从一开始就加载每个网页。我该怎么做?
def setup(self):
print 'running fp'
self.path = r'path to my profile folder'
self.profile = webdriver.FirefoxProfile(self.path)
self.web = webdriver.Firefox(self.profile)
self.cache = self.web.application_cache
【问题讨论】: