def test_form_submission_with_data_driven(self, get_data): home_page = HomePage(self.driver) home_page.get_name().clear() home_page.get_name().send_keys(get_data[0]) home_page.get_email().clear() home_page.get_email().send_keys(get_data[1]) home_page.get_checkbox().click() self.select_option_by_text(home_page.get_gender(), get_data[2]) home_page.submit_form().click() success_msg = home_page.get_alert_text().text assert ("Success" in success_msg)
def test_form_submission(self, getData): log = self.getLogger() log.debug("starting test") homepage = HomePage(self.driver) m = getData["firstname"] homepage.get_name().send_keys(getData["firstname"]) homepage.get_email().send_keys(getData["lastname"]) homepage.get_checkbox().click() self.select_option_by_text(homepage.get_gender(), getData["gender"]) homepage.submit_form().click() alertText = homepage.get_success_message().text assert ("Success" in alertText) self.driver.refresh()
def test_form_submission(self): home_page = HomePage(self.driver) home_page.get_name().send_keys("Russel") home_page.get_email().send_keys("*****@*****.**") home_page.get_checkbox().click() #sel = Select(home_page.get_gender()) #sel.select_by_visible_text("Male") self.select_option_by_text(home_page.get_gender(), "Male") home_page.submit_form().click() success_msg = home_page.get_alert_text().text assert ("Success" in success_msg)