Skip to content

Commit ffe30b3

Browse files
author
Konstantinacc
committed
Added Chrome version control before updating options to chrome webdriver.
1 parent c9796dd commit ffe30b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codebender_testing/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ def create_webdriver(command_executor, desired_capabilities):
151151

152152
if browser_name == "chrome":
153153
desired_capabilities = DesiredCapabilities.CHROME.copy()
154-
options = chrome.options.Options()
155-
browser_profile_path = os.path.join('/tmp', _get_chrome_profile())
156-
options.add_argument('--user-data-dir=' + browser_profile_path)
157154
if desired_capabilities["version"] > CHROME_EXT_MAX_CHROME_VERSION:
158155
# Add the chrome app to capabilities.
156+
options = chrome.options.Options()
157+
browser_profile_path = os.path.join('/tmp', _get_chrome_profile())
158+
options.add_argument('--user-data-dir=' + browser_profile_path)
159159
options.add_extension(os.path.join(_EXTENSIONS_DIR, _CHROME_APP_FNAME))
160160
options.add_argument("--user-agent=" + TESTS_USER_AGENT_CHROME)
161161
else:

0 commit comments

Comments
 (0)