File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ def jsondump(data):
79
79
'LOCATE_ELEMENT' : 30
80
80
}
81
81
82
+ TESTS_USER_AGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 codebender-selenium'
83
+
82
84
# Set up Selenium Webdrivers to be used for selenium tests
83
85
def _get_firefox_profile ():
84
86
"""Returns the Firefox profile to be used for the FF webdriver.
@@ -147,6 +149,8 @@ def create_webdriver(command_executor, desired_capabilities):
147
149
desired_capabilities = DesiredCapabilities .FIREFOX .copy ()
148
150
desired_capabilities .update (_capabilities )
149
151
browser_profile = _get_firefox_profile ()
152
+ browser_profile .set_preference ("general.useragent.override" , TESTS_USER_AGENT )
153
+ desired_capabilities ["firefox_profile" ] = browser_profile .update_preferences ()
150
154
else :
151
155
raise ValueError ("Invalid webdriver %s (only chrome and firefox are supported)" % browser_name )
152
156
return webdriver .Remote (
You can’t perform that action at this time.
0 commit comments