Beispiel #1
0
    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()
Beispiel #2
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_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()
Beispiel #4
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.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()
Beispiel #5
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["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()
 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 #7
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()