コード例 #1
0
 def setup(self, browser):
     page = LoginPage(
         browser, "http://selenium1py.pythonanywhere.com/accounts/login/")
     page.open()
     email = str(time.time()) + "@fakemail.org"
     password = str(time.time())
     page.register_new_user(email, password)
     time.sleep(1)
     page.should_be_authorized_user()
コード例 #2
0
class LoginTest(TestBase):

    login_page = LoginPage()
    dashboard_homepage = DashBoardHomePage()

    def test_add_additional_page_012(self):
        username = "******"
        password = ""
        self.login_page.open_login_page()
        self.login_page.login(username, password)
コード例 #3
0
class LoginTest(TestBase):

    login_page = LoginPage()

    def test_login_001(self):
        username = "******"
        password = ""
        self.login_page.open_login_page()
        self.login_page.login(username, password)
        current_url = login_page.browser.get_driver().current_url
        assert ('2f9njff6y9.page' in current_url)
コード例 #4
0
class LoginTest(TestBase):

    login_page = LoginPage()

    def test_login_001(self):
        username = "******"
        password = "******"
        self.login_page.open_login_page()
        self.login_page.login(username, password)
        current_url = login_page.browser.get_driver().current_url
        browser = webdriver.Chrome
        alert = browser.switch_to_alert()
        alert.accept()
        assert ('logins' in current_url)
コード例 #5
0
def test_guest_can_go_to_login_page(browser):
    page = MainPage(browser, link)
    page.open()
    page.go_to_login_page()
    login_page = LoginPage(browser, browser.current_url)
    login_page.should_be_login_page()
コード例 #6
0
def setup(chrome_driver, context):
    context['login_object'] = LoginPage(chrome_driver)
    context['login_object'].login_into_todoist("*****@*****.**",
                                               "Divya123")
    context['home_object'] = HomePage(chrome_driver)
    context['project_object'] = ProjectPage(chrome_driver)
コード例 #7
0
def test_login_and_register_form(browser):
    link = "http://selenium1py.pythonanywhere.com/en-gb/accounts/login/"
    page = LoginPage(browser, link)
    page.open()
    page.should_be_login_form()