Reputation: 1
I'm trying to run Firefox as a different user in my Selenium tests. How can I tell Selenium to 'run as' a specified user? My application has a windows authentication, and I need to run tests with different roles.
Upvotes: 0
Views: 2141
Reputation: 31
This can be done by creating Firefox profile, use firefox.exe -p to launch profile manager
Once the profile is created as required use the profile name and launch the driver:
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("profileName");
WebDriver driver = new FirefoxDriver(myprofile);
Hope this helps.
Upvotes: 3