Beispiel #1
0
 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_homepage(self,getdata):
     log = self.getLogger()
     homepage = HomePage(self.driver)
     homepage.getName().send_keys(getdata["firstname"])
     log.info("First name is "+getdata["firstname"])
     homepage.getEmail().send_keys(getdata["email"])
     log.info("Email is " + getdata["email"])
     homepage.getPassword().send_keys(getdata["password"])
     homepage.selectCheckbox().click()
     self.selectByText(homepage.Gender(),getdata["gender"])
     log.info("Gender is " + getdata["gender"])
     homepage.selectRadio().click()
     homepage.clickCalendar().click()
     homepage.clickSubmit().click()
     assert "Success" in homepage.getAlert().text
     self.driver.refresh()
     print("msg")
Beispiel #3
0
    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()