예제 #1
0
    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["email"])
        homepage.getcheckBox().click()
        self.SelectOptionByText(homepage.getGender(), getData["gender"])
        homepage.SubmitButton().click()
        message = homepage.SuccessMessage().text
        assert ("Success" in message)
        self.driver.refresh()
예제 #2
0
 def test_FormSubmission(self, getData):
     log = self.getLogger()
     home = Homepage(self.driver)
     log.info("Name: " + getData["name"])
     home.getName().send_keys(getData["name"])
     log.info("Email: " + getData["email"])
     home.getEmail().send_keys(getData["email"])
     log.info("Password: "******"password"])
     home.getPassword().send_keys(getData["password"])
     home.checkIcecream().click()
     log.info("Gender: " + getData["gender"])
     self.SelectOptionByText(home.genderSelection(), getData["gender"])
     home.submitButton().click()
     alert = home.getAlert().text
     assert "Success!" in alert
     self.driver.refresh()