def test_empty_email(self):
        register_page = RegisterPage(self.driver)

        register_page.enter_password(Variables.VALID_PASSWORD)
        register_page.enter_password_confirm(Variables.VALID_PASSWORD)
        register_page.accept_privacy_policy()
        register_page.click_register_button()

        register_page.email_should_be_required()
    def test_short_password(self):
        register_page = RegisterPage(self.driver)

        register_page.enter_email(Variables.VALID_EMAIL)
        register_page.enter_password(Variables.SHORT_PASSWORD)
        register_page.enter_password_confirm(Variables.SHORT_PASSWORD)
        register_page.accept_privacy_policy()
        register_page.click_register_button()

        register_page.error_should_be_visible(
            Variables.PASSWORD_TOO_SHORT_MESSAGE)
    def test_existing_email(self):
        register_page = RegisterPage(self.driver)

        register_page.enter_email(Variables.VALID_EMAIL)
        register_page.enter_password(Variables.VALID_PASSWORD)
        register_page.enter_password_confirm(Variables.VALID_PASSWORD)
        register_page.accept_privacy_policy()
        register_page.click_register_button()

        register_page.error_should_be_visible(
            Variables.USER_ALREADY_EXISTS_MESSAGE)
 def test_passwords_are_not_match(self, browser):
     page = RegisterPage(browser, register_url)
     page.open()
     page.enter_password(login, password)
     page.take_a_screenshot(browser)