From c9c190ae6a052ec4c2720dcbeb7303454d3f1579 Mon Sep 17 00:00:00 2001 From: Leah Klearman <lklrmn@gmail.com> Date: Wed, 5 Sep 2012 20:12:22 -0700 Subject: [PATCH] switch to the popup window by name --- automation-tests/browserid/pages/base.py | 2 -- automation-tests/browserid/pages/sign_in.py | 9 +-------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/automation-tests/browserid/pages/base.py b/automation-tests/browserid/pages/base.py index e8cd99b7b..adf65cb3f 100644 --- a/automation-tests/browserid/pages/base.py +++ b/automation-tests/browserid/pages/base.py @@ -7,8 +7,6 @@ class Base(object): - _page_title = 'Mozilla Persona: A Better Way to Sign In' - def __init__(self, selenium, timeout=60): self.selenium = selenium self.timeout = timeout diff --git a/automation-tests/browserid/pages/sign_in.py b/automation-tests/browserid/pages/sign_in.py index 3f374bc24..ffb54e656 100644 --- a/automation-tests/browserid/pages/sign_in.py +++ b/automation-tests/browserid/pages/sign_in.py @@ -35,14 +35,7 @@ class SignIn(Base): def __init__(self, selenium, timeout, expect='new'): Base.__init__(self, selenium, timeout) - if self.selenium.title != self._page_title: - for handle in self.selenium.window_handles: - self.selenium.switch_to_window(handle) - WebDriverWait(self.selenium, self.timeout).until(lambda s: s.title) - if self.selenium.title == self._page_title: - break - else: - raise Exception('Popup has not loaded') + selenium.switch_to_window('__persona_dialog') if expect == 'new': WebDriverWait(self.selenium, self.timeout).until( -- GitLab