Saturday, January 11, 2014

Changing the User Agent


This is easy with the Firefox Driver:
FirefoxProfile profile = new FirefoxProfile();
profile.addAdditionalPreference("general.useragent.override", "some UA string");
WebDriver driver = new FirefoxDriver(profile);

1 comment: