def test_all_blank_submit(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) signup_page.click_on_form_submit_button() expected_messgae_firstname_Required = signup_page.firstName_mandatory_dialogue( ) assert expected_messgae_firstname_Required == "required" expected_messgae_lastname_required = signup_page.lastName_mandat_dialogue( ) assert expected_messgae_lastname_required == "required" expected_message_email_required = signup_page.email_mandat_dialogue() assert expected_message_email_required == "required" expected_message_address = signup_page.mailing_address_mandat_dialogue( ) assert expected_message_address == "required" expected_message_city_required = signup_page.city_mand_dialogue() assert expected_message_city_required == "required" expected_message_State_Required = signup_page.state_mandat_dialogue() assert expected_message_State_Required == "required" expected_postalcode_message = signup_page.postal_code_mandat_dialogue() assert expected_postalcode_message == "required" expected_message_password = signup_page.password_mandat_dialogue() assert expected_message_password == "required"
def test_signup_form_present(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) expected = signup_page.signUp_page_displayed() assert expected == "Create A New Account"
def test_signUp_button_present(self): driver = self.driver driver.get(siteurl) login = LoginPage( driver ) # creating instance of Login page to access all it's functions expected = login.signUp_button_present() assert expected == True
def test_valid_username_wrong_pass(self): driver = self.driver driver.get(siteurl) login = LoginPage( driver ) # creating instance of Login page to access all it's functions login.enter_username("*****@*****.**") login.enter_password("ABCD") # this is wrong password login.click_login_button() expected_dialogue = login.check_invalid_credential_dialogue() assert expected_dialogue == "Could not log in user: Internal Error"
def test_valid_pass_wrong_username(self): driver = self.driver driver.get(siteurl) login = LoginPage( driver ) # creating instance of Login page to access all it's functions login.enter_username("*****@*****.**" ) # wrong username which does not exist in system login.enter_password("john") # this is correct password login.click_login_button() expected_dialogue = login.check_invalid_credential_dialogue() assert expected_dialogue == "Non-existing email, please try again."
def test_all_but_email(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) signup_page.enter_firstName("Mark") signup_page.enter_lastName("Zuckerberg") signup_page.enter_birth_date("17/03/2020") signup_page.enter_mailing_address("Facebook") signup_page.enter_city("Windsor") signup_page.select_state("Connecticut") signup_page.enter_postal_code("90001") signup_page.enter_password("ABC@123") signup_page.click_on_form_submit_button() expected_message_email_required = signup_page.email_mandat_dialogue() assert expected_message_email_required == "required"
def test_all_field_existing_email(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) signup_page.enter_firstName("Mark") signup_page.enter_lastName("Zuckerberg") signup_page.enter_birth_date("17/03/2020") signup_page.enter_email("*****@*****.**") signup_page.enter_mailing_address("Facebook") signup_page.enter_city("Windsor") signup_page.select_state("Connecticut") signup_page.enter_postal_code("90001") signup_page.enter_password("ABC@123") signup_page.click_on_form_submit_button() email_duplicate_message = signup_page.email_mandat_dialogue() assert email_duplicate_message == "Email is already registered"
def test_all_field_happy_Path(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) signup_page.enter_firstName("Mark") signup_page.enter_lastName("Zuckerberg") signup_page.enter_birth_date("17/03/2020") signup_page.enter_email("*****@*****.**") signup_page.enter_mailing_address("Facebook") signup_page.enter_city("Windsor") signup_page.select_state("Connecticut") signup_page.enter_postal_code("90001") signup_page.enter_password("ABC@123") signup_page.click_on_form_submit_button() expected = signup_page.validate_signup_successfull() assert expected == "Thank you for signup!"
def test_mandatory_field(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_on_signup_button() signup_page = SignUpPage(driver) signup_page.enter_firstName("Mohit") signup_page.enter_lastName("Singh") signup_page.enter_email("*****@*****.**") signup_page.enter_mailing_address("Society1") signup_page.enter_city("Windsor") signup_page.select_state("Connecticut") signup_page.enter_postal_code("90001") signup_page.enter_password("ABC@123") signup_page.click_on_form_submit_button() signup_page = SignUpPage(driver) expected = signup_page.validate_signup_successfull() assert expected == "Thank you for signup!"
def test_invalid_usename_blank(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.enter_password("john") login.click_login_button() expected_dialogue1 = login.check_blank_email_credentials() assert expected_dialogue1 == "Please enter your e-mail"
def test_invalid_pass_blank(self): driver = self.driver driver.get(siteurl) login = LoginPage( driver ) # creating instance of Login page to access all it's functions login.enter_username("*****@*****.**") login.click_login_button() expected_dialogues = login.check_blank_only_pass_credential() assert expected_dialogues == "Please enter your password"
def test_login_valid(self): driver = self.driver driver.get(siteurl) login = LoginPage( driver ) # creating instance of Login page to access all it's functions login.enter_username("*****@*****.**") login.enter_password("john") login.click_login_button() home = HomePage(driver) expected = home.check_logout_button_display( ) # Validate that LogOut button is present after successful Login assert expected == True home.click_log_out_button()
def test_login_invalid_bothBlank(self): driver = self.driver driver.get(siteurl) login = LoginPage(driver) login.click_login_button() expected_dialogue1 = login.check_blank_email_credentials() assert expected_dialogue1 == "Please enter your e-mail" expected_dialogue2 = login.check_blank_Password_credentials() assert expected_dialogue2 == "Please enter your password"