擅长:python、mysql、java
<p>对于Firefox:</p>
<pre><code>from selenium import webdriver
fp = webdriver.FirefoxProfile()
fp.set_preference("network.cookie.cookieBehavior", 2)
browser = webdriver.Firefox(firefox_profile=fp)
</code></pre>
<p>资料来源:<a href="http://selenium-python.readthedocs.org/en/latest/faq.html#how-to-auto-save-files-using-custom-firefox-profile" rel="nofollow noreferrer">FAQ</a>,a<a href="https://stackoverflow.com/questions/18106588/how-to-disable-cookies-using-webdriver-for-chrome-and-firefox-java">JS selenium cookie question</a>,和<a href="http://kb.mozillazine.org/Network.cookie.cookieBehavior" rel="nofollow noreferrer">the description of ^{<cd1>}</a>。</p>