Commit a57762c3 authored by melandory's avatar melandory Committed by Commit bot

[Password manager tests automation] Fix "No such frame" error.

In some cases selenium are unable to select frame, which give an
exception and prevents test running. Fix this by explicitly navigating
to desired frame.

BUG=369521
R=vabr@chromium.org

Review URL: https://codereview.chromium.org/1147483003

Cr-Commit-Position: refs/heads/master@{#330491}
parent ccd06532
...@@ -113,8 +113,7 @@ class Environment: ...@@ -113,8 +113,7 @@ class Environment:
time". time".
""" """
self.driver.get("chrome://settings/clearBrowserData") self.driver.get("chrome://settings-frame/clearBrowserData")
self.driver.switch_to_frame("settings")
time_range_selector = "#clear-browser-data-time-period" time_range_selector = "#clear-browser-data-time-period"
# TODO(vabr): Wait until time_range_selector is displayed instead. # TODO(vabr): Wait until time_range_selector is displayed instead.
...@@ -161,8 +160,7 @@ class Environment: ...@@ -161,8 +160,7 @@ class Environment:
# TODO(melandory): We should check why it's off in a first place. # TODO(melandory): We should check why it's off in a first place.
# TODO(melandory): Investigate, maybe there is no need to enable it that # TODO(melandory): Investigate, maybe there is no need to enable it that
# often. # often.
self.driver.get("chrome://settings") self.driver.get("chrome://settings-frame")
self.driver.switch_to_frame("settings")
script = "document.getElementById('advanced-settings-expander').click();" script = "document.getElementById('advanced-settings-expander').click();"
self.driver.execute_script(script) self.driver.execute_script(script)
# TODO(vabr): Wait until element is displayed instead. # TODO(vabr): Wait until element is displayed instead.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment