Beispiel #1
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.box.get_auth_url())
        try:
            enter_text_by_id(driver, "login", BOX_EMAIL, False)
            enter_text_by_id(driver, "password", BOX_PASSWD)

        # When
            click_button_by_id(driver, "consent_reject_button")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(driver.current_url))
        driver.quit()
Beispiel #2
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.dropbox.get_auth_url())
        try:
            enter_text_by_xpath(driver, "//input[@name='login_email']", DROPBOX_EMAIL, press_return=False)
            enter_text_by_xpath(driver, "//input[@name='login_password']", DROPBOX_PASSWD)

        # When
            click_button_by_name(driver, "deny_access")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(driver.current_url))
        driver.quit()
Beispiel #3
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.box.get_auth_url())
        try:
            enter_text_by_id(driver, "login", BOX_EMAIL, False)
            enter_text_by_id(driver, "password", BOX_PASSWD)

            # When
            click_button_by_id(driver, "consent_reject_button")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(
            driver.current_url))
        driver.quit()
Beispiel #4
0
    def test_user_cancel_connection(self):
        # Given
        driver = webdriver.Firefox()
        driver.get(self.dropbox.get_auth_url())
        try:
            enter_text_by_xpath(driver,
                                "//input[@name='login_email']",
                                DROPBOX_EMAIL,
                                press_return=False)
            enter_text_by_xpath(driver, "//input[@name='login_password']",
                                DROPBOX_PASSWD)

            # When
            click_button_by_name(driver, "deny_access")
            wait_for_code(driver, "errorPageContainer")

        except:
            raise Exception("timeout for authorization")

        # Then
        self.assertTrue("error_description" in convert_url_to_query_dict(
            driver.current_url))
        driver.quit()