def test_homePage(self, getData): log = self.getLogger() self.driver.implicitly_wait(2) homepage = HomePage(self.driver) log.info("first name is " + getData["FirstName"]) homepage.getName().send_keys(getData["FirstName"]) homepage.getEmail().send_keys(getData["LastName"]) homepage.getPassword().send_keys("Test@123") homepage.getCheckbox().click() self.SelectGender(homepage.getGender(), getData["Gender"]) homepage.getSubmitButton().click() self.driver.refresh()
def test_formSubmission(self, getData): homepage = HomePage(self.driver) homepage.getNameField().send_keys(getData["firstname"]) homepage.getEmailField().send_keys(getData["email"]) homepage.getCheckMe().click() self.selectOptionByText(homepage.getGender(), getData["gender"]) homepage.getSubmitButton().click() alertText = homepage.displaySuccessMessage() assert "Success" in alertText self.driver.refresh()
def test_formSubmission(self, getData): log = self.getLogger() homePage = HomePage(self.driver) log.info("first name is " + getData["firstname"]) homePage.getName().send_keys(getData["firstname"]) homePage.getEmail().send_keys(getData["lastname"]) homePage.getCheckbox().click() # select class provides the methods for handling the options in dropdown # dropdown = Select(homePage.getDropDown()) # dropdown.select_by_visible_text('Female') # dropdown.select_by_index(0) self.selectOptionsByText(homePage.getDropDown(), getData["gender"]) homePage.getSubmitButton().click() message = homePage.getSuccessText().text assert 'success' in message self.driver.refresh()