I try to start firefox with specified profile:
firefox_profile = webdriver.FirefoxProfile('/Users/p2mbot/projects/test/firefox_profile')
driver = webdriver.Firefox(firefox_profile=firefox_profile)
driver.get('http://google.com')
time.sleep(60)
driver.quit()
/Users/p2mbot/projects/test/firefox_profile
-- this directory is correct firefox profile dir, I created it with firefox-bin --ProfileManager
But when I check about:cache page in firefox via selenium, it has different path for cache:
Storage disk location: /var/folders/jj/rdpd1ww53n95y5vx8w618k3h0000gq/T/tmpp2ahq70_/webdriver-py-profilecopy/cache2
If run firefox via firefox-bin --ProfileManager and choose the profile, it will show at about:cache page correct path /Users/p2mbot/projects/test/firefox_profile
Why webdriver ignore profile path for firefox? With chrome there is not such problem.
See Question&Answers more detail:os