Skip to content

Instantly share code, notes, and snippets.

@datakurre
Last active February 27, 2023 06:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save datakurre/d072ea8bb0809a69989e to your computer and use it in GitHub Desktop.
Save datakurre/d072ea8bb0809a69989e to your computer and use it in GitHub Desktop.
Setting custom user agent for Firefox with RobotFramework and Selenium2Library
*** Settings ***
Library Selenium2Library
*** Test Cases ***
Open desktop version
Open browser https://www.arstechnica.com/
Open mobile version
Open browser https://www.arstechnica.com/ ff_profile_dir=.
user_pref("general.useragent.override", "iPhone");
@PeterMichalko
Copy link

I like that approach and I use it. It works fine, but I experienced an issue with Firefox 31 in Linux. I got memory error and all server memory was consumed. Did not reproduce the same issue in Windows 7. The issue was fixed by putting prefs.js into empty subfolder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment