Reputation: 31
Trying to open firefox with already installed addons using selenium 2 but always opens with default firefox profile having predefined preferences
from selenium import webdriver
driver = webdriver.Firefox()
The above lines of code initiates firefox with default profile. How to make it initiate with user specified preferences?
Upvotes: 3
Views: 1533
Reputation: 676
There is no need to set profile, it could be created automatically, you just need path to addons, e.g.:
string firebugPath = "C:\\Users\\Administrator\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\x7nutq33.default\\extensions\\[email protected]";
FirefoxProfile profile = new FirefoxProfile();
profile.AddExtension(firebugPath);
Driver = new FirefoxDriver(profile);
Upvotes: 0
Reputation: 25056
You can launch it with a custom profile using something like:
profile = FirefoxProfile("path.to.profile")
driver = webdriver.Firefox(profile)
Upvotes: 2