def test_formSubmission(self, getData): log = self.getLogger() homePage = HomePage(self.driver) #homePage.getName().send_keys(getData[0]) log.info("first name is " + getData["firstname"]) homePage.getName().send_keys(getData["firstname"]) #driver.find_element_by_css_selector("input[name='name']").send_keys("Suchithra") #driver.find_element_by_name("email").send_keys("*****@*****.**") homePage.getEmail().send_keys(getData["email"]) homePage.getPwdCheck().click() #driver.find_element_by_id("exampleCheck1").click() self.selectOptionByText(homePage.getGender(), getData["gender"]) homePage.getSubmit().click() #driver.find_element_by_xpath("//input[@type='submit']").click() # txt = driver.find_element_by_css_selector("[class*='alert-success']").text # txt = driver.find_element_by_class_name("alert-success").text #txt = driver.find_element_by_xpath("//*[contains(@class,'alert-success')]").text txt = homePage.getSuccess().text print(txt) assert "Success!" in txt self.driver.refresh()
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): homePage = HomePage(self.driver) log.info("Full Name : " + getData["fullname"]) homePage.getName().send_keys(getData["fullname"]) homePage.getEmail().send_keys(getData["email"]) homePage.getExampleCheck().click() self.selectOptionsByText(homePage.getGender(), getData["gender"]) homePage.submitForm().click() alertText = homePage.getSuccess().text 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.getLastName().send_keys(getData["lastname"]) homepage.getCheckBox().click() self.selectOptionBYText(homepage.getGender(), getData["gender"]) homepage.submitForm().click() alertText = homepage.getSuccesMessage().text assert ("Success" in alertText) self.driver.refresh()
def test_formsubmission(self, getdata): homepage = HomePage(self.driver) homepage.getname().click() homepage.getname().send_keys(getdata[0]) homepage.getEmail().send_keys(getdata[1]) homepage.getCheckBox().click() #a = Select(homepage.getGender()) #a.select_by_visible_text("Male") self.selectOptionByText(homepage.getGender(), getdata[2]) homepage.submitForm().click() alertText = homepage.getSuccessMessage().text assert ("Success" in alertText)
def test_formSubmission(self, getData): log = self.getLogger() homepage = HomePage(self.driver) log.info(getData) log.info("entering details into all the fields") homepage.getName().send_keys(getData["firstname"]) homepage.getEmail().send_keys(getData["Email"]) homepage.getPassword().send_keys(getData["password"]) homepage.getCheckbox().click() element = homepage.getGender() self.selectOptionByText(element, getData["gender"]) homepage.getRadioButton().click() homepage.getSuccessButton().click() alertText = homepage.getSuccessMsg().text log.info(alertText) assert "Success" in alertText self.driver.refresh()