Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Changes for bypass modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Teri Charles§q! authored and Matt Brandt committed May 21, 2015
1 parent a04905d commit 2316843
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pages/start_page.py
Expand Up @@ -2,15 +2,23 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as expected
from selenium.webdriver.support.ui import WebDriverWait

from pages.base import Base


class StartPage(Base):

_page_title = 'Firefox Affiliates'
_close_modal_locator = (By.CSS_SELECTOR, '#modal button.close')

def __init__(self, testsetup, open_url=True):
""" Creates a new instance of the class and gets the page ready for testing """
Base.__init__(self, testsetup)
if open_url:
self.open('/')
self.selenium.find_element(*self._close_modal_locator).click()
WebDriverWait(self.selenium, testsetup.timeout).until(
expected.invisibility_of_element_located(self._close_modal_locator))

0 comments on commit 2316843

Please sign in to comment.