def test_07_assert_title(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) title = driver.title print(title) assert "coreplus" in title
def test_04_invalid_phone(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) contactus.enter_name("QATest") contactus.enter_phone("abcd") contactus.enter_email("*****@*****.**") contactus.enter_message("I like pineapples") contactus.click_submit_button() message = contactus.verify_error_message() self.assertEqual( message, "Validation errors occurred. Please confirm the fields and try again." )
def test_01_success_submission_02(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) contactus.enter_name("QATest") contactus.enter_phone("0464935234") contactus.enter_email("*****@*****.**") contactus.enter_message("I like pineapples") contactus.click_submit_button() wait = WebDriverWait(contactus.driver, 10) message = wait.until( EC.visibility_of_element_located( (By.CLASS_NAME, Locators.verify_message_class_name)))
def test_01_success_submission_01(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) contactus.enter_name("QATest") contactus.enter_phone("0464935234") contactus.enter_email("*****@*****.**") contactus.enter_message("I like pineapples") contactus.click_submit_button() message = contactus.verify_success_message() print(message) self.assertEqual(message, "Your message was sent successfully. Thanks.")
def test_08_check_element_present(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) msg = contactus.verify_link_text_message() self.assertEqual(msg, "help.coreplus.com")
def test_06_invalid_email(self): driver = self.driver driver.get("https://coreplus.com.au/contact/") contactus = ContactusPage(driver) contactus.enter_name("QATest") contactus.enter_phone("0464935234") contactus.enter_email("testtest.com") contactus.enter_message("I like pineapples") contactus.click_submit_button() msg = contactus.verify_email_error_message() self.assertEqual(msg, "Email address seems invalid.")