summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorvabr <vabr@chromium.org>2015-03-30 01:20:26 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-30 08:20:57 +0000
commitb76fc1703f05c949d115f0a19eb0841f8ddeb356 (patch)
tree67f3663655cd5e18dc0aae08b4b8ec482ffdb689 /components
parentf9e6e9229b6e7f3aab415002a65f6c3aec26e0d6 (diff)
downloadchromium_src-b76fc1703f05c949d115f0a19eb0841f8ddeb356.zip
chromium_src-b76fc1703f05c949d115f0a19eb0841f8ddeb356.tar.gz
chromium_src-b76fc1703f05c949d115f0a19eb0841f8ddeb356.tar.bz2
[Password Manager Python tests] Wait before autofill
The tests currently expect that autofill executes immediately after page load. This holds on a fast developer's machine, but not on a slow virtual one. The CL hotfixes this with a 2s Wait() call, and adds a TODO to provide a proper solution. BUG=369521 Review URL: https://codereview.chromium.org/1037413002 Cr-Commit-Position: refs/heads/master@{#322753}
Diffstat (limited to 'components')
-rw-r--r--components/test/data/password_manager/automated_tests/websitetest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/test/data/password_manager/automated_tests/websitetest.py b/components/test/data/password_manager/automated_tests/websitetest.py
index 5fdf6e9..1ec6d7b 100644
--- a/components/test/data/password_manager/automated_tests/websitetest.py
+++ b/components/test/data/password_manager/automated_tests/websitetest.py
@@ -219,6 +219,7 @@ class WebsiteTest:
action_chains = ActionChains(self.driver)
action_chains.key_down(Keys.CONTROL).key_up(Keys.CONTROL).perform()
+ self.Wait(2) # TODO(vabr): Detect when autofill finished.
if self.autofill_expectation == WebsiteTest.AUTOFILLED:
if password_element.get_attribute("value") != self.password:
raise Exception("Error: autofilled password is different from the saved"
@@ -249,6 +250,7 @@ class WebsiteTest:
logging.log(SCRIPT_DEBUG, "action: FillUsernameInto %s" % selector)
username_element = self.WaitUntilDisplayed(selector)
+ self.Wait(2) # TODO(vabr): Detect when autofill finished.
if not self.username_not_auto:
if self.autofill_expectation == WebsiteTest.AUTOFILLED:
if username_element.get_attribute("value") != self.username: