0

The code block tries to assign a firefox profile to webdriver but the webdriver always uses default one. Has anyone have an idea?

from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.support.ui import WebDriverWait

fp = FirefoxProfile('C:\\Users\\<USER>\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\ji8rbij6.test')
fp.update_preferences()
browser = webdriver.Firefox(firefox_profile=fp)

I do thank you in Advance

There are some examples in java but i am not good at java

digging
  • 131
  • 1
  • 2
  • 9
  • how do you know that it uses "default" one? remember, that selenium will never use original profile, it will copy it. Also you are updating preferences, but not changing any, there's no point in that – timbre timbre Oct 29 '18 at 01:44
  • When web driver opens a web page,check the firefox profile at the same firefox window via about:profiles.Even if the code assigns ji8rbij6.test , the profile tab says it uses the default profile.The code,fp.update.referances, updates the proife if there is any change such as cache or cookies settings.If there is no change it doesnt do anything.However the problem still remains ,it doesnt choose the profile the code point to.@Kiril S. – digging Oct 29 '18 at 06:18
  • THanks to @DebanjanB as well. The solutions at these posts are given in java.I am not good at java but thanks – digging Oct 29 '18 at 06:24
  • There is an other solution posted by @DebanjanB [link](https://stackoverflow.com/questions/45521012/how-to-start-firefox-with-with-specific-profile-selenium-python-geckodriver) I applied this solution as well but it still uses the default profiles – digging Oct 29 '18 at 09:53

0 Answers0