Reputation: 449
Besides having read all the posts about it in stackoverflow and many others, I have tried every idea people give, but I can't do it work.
Supposedly I should have Selenium 2 / Webdriver working with the profile I want in Firefox with these lines:
ProfilesIni allProfiles = new ProfilesIni();
FirefoxProfile profile = allProfiles.getProfile("My_Profile");
driver = new FirefoxDriver(profile);
OR
FirefoxProfile profile = new ProfilesIni().getProfile("path_to_profile");
driver = new FirefoxDriver(profile);
OR
several other ideas doesn't work either (at least for me).
Debugging my code and watching every element, I have realized that in fact, "my_profile" is into "allProfiles" collection, but when I try to get it, it doesn't work; it takes a "default-profile", not the one I want.
Is this some kind of bug? Is it possible to use a pre-existing profile?
--> My fault: It didn't work apparently because of the name of the profile; having nothing else to try, I've changed it so now it has just alphanumeric characters and now it works. Since I have solved it, I don't need more answers, but I wont delete the question because it could help someone else.
Upvotes: 4
Views: 3821
Reputation: 449
It didn't work apparently because of the name of the profile; having nothing else to try, I've changed it so now it has just alphanumeric characters and now it works. Since I have solved it, I don't need more answers, but I wont delete the question because it could help someone else.
Upvotes: 3