Class AssertionSteps


  • public class AssertionSteps
    extends java.lang.Object
    This class contains the assertion related step definitions for Web Tests
    • Constructor Detail

      • AssertionSteps

        public AssertionSteps​(TestContext testContext)
    • Method Detail

      • i_can_see_text

        @When("^I can see text (.+)$")
        public void i_can_see_text​(java.lang.String text)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_dont_see_text

        @When("^I don\'t see text (.+)$")
        public void i_dont_see_text​(java.lang.String text)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_on_webElement_with_Xpath

        @When("^I can view text (.+) on web element with xpath (.+)$")
        public void i_can_see_text_on_webElement_with_Xpath​(java.lang.String text,
                                                            java.lang.String xpath)
                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_verify_current_date_on_webElement_with_Xpath

        @When("^I verify current date in the (.+) time zone in (.+) format on web element with xpath (.+)$")
        public void i_verify_current_date_on_webElement_with_Xpath​(java.lang.String timeZone,
                                                                   java.lang.String format,
                                                                   java.lang.String xpath)
                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_verify_current_date_on_webElement_with_Locator_Path

        @When("^I verify current date in the (.+) time zone in (.+) format on web element with locator path (.+)$")
        public void i_verify_current_date_on_webElement_with_Locator_Path​(java.lang.String timeZone,
                                                                          java.lang.String format,
                                                                          java.lang.String locatorPath)
                                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_contains

        @When("^I can see contains text (.+)$")
        public void i_can_see_text_contains​(java.lang.String text)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_see_text

        @When("^I see text list$")
        public void i_see_text​(io.cucumber.datatable.DataTable textList)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_dont_see_text

        @When("^I cannot see text in a web page from list (.+)$")
        public void i_dont_see_text​(io.cucumber.datatable.DataTable textList)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_on_alert

        @When("^I check text (.+) is on web alert$")
        public void i_can_see_text_on_alert​(java.lang.String text)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_word_in_URL

        @When("^I can see word (.+) in the url$")
        public void i_can_see_word_in_URL​(java.lang.String text)
                                   throws java.lang.Exception
        Verify if the text is present in the url
        Parameters:
        text -
        Throws:
        java.lang.Exception
      • i_dont_see_word_in_URL

        @When("^I don\'t see word (.+) in the url$")
        public void i_dont_see_word_in_URL​(java.lang.String word)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_matches_URL

        @When("^I can see the url as (.+)$")
        public void i_can_see_text_matches_URL​(java.lang.String text)
                                        throws java.lang.Exception
        Verify if the text is present in the url
        Parameters:
        text -
        Throws:
        java.lang.Exception
      • i_can_not_see_text_matches_URL

        @When("^I can not see the url as (.+)$")
        public void i_can_not_see_text_matches_URL​(java.lang.String text)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_link

        @When("^I can see link (.+)$")
        public void i_can_see_link​(java.lang.String linkText)
                            throws java.lang.Exception
        Verify if the link text exists
        Parameters:
        linkText -
        Throws:
        java.lang.Exception
      • i_cannot_see_link

        @When("^I can not see link (.+)$")
        public void i_cannot_see_link​(java.lang.String linkText)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_element

        @When("^I can see element (.+)$")
        public void i_can_see_element​(java.lang.String locatorPath)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_element_or

        @When("^I can see one of elements (.+) or (.+)$")
        public void i_can_see_element_or​(java.lang.String locatorPath1,
                                         java.lang.String locatorPath2)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_disabled_element

        @When("^I can see disabled element (.+)$")
        public void i_can_see_disabled_element​(java.lang.String locatorPath)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_checkbox_is_selected

        @When("^I can see checkbox is selected for element with xpath (.+)$")
        public void i_can_see_checkbox_is_selected​(java.lang.String xpath)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_in_title

        @When("^I can see the text (.+) in the title$")
        public void i_can_see_text_in_title​(java.lang.String text)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_cannot_see_text_in_title

        @When("^I cannot see the text (.+) in the title$")
        public void i_cannot_see_text_in_title​(java.lang.String text)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_title

        @When("^I can see the title as (.+)$")
        public void i_can_see_title​(java.lang.String text)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_checkbox_is_not_selected

        @When("^I can see checkbox is not selected for element with xpath (.+)$")
        public void i_can_see_checkbox_is_not_selected​(java.lang.String xpath)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • disabled_element

        @When("^I check element (.+) is disabled$")
        public void disabled_element​(java.lang.String locatorPath)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_can_see_text_on_webElement_with_Xpath_And_Attributes

        @When("^I can see attribute info on (.+) web element with xpath (.+) for attribute (.+) with attrbute value (.+)$")
        public void i_can_see_text_on_webElement_with_Xpath_And_Attributes​(java.lang.String text,
                                                                           java.lang.String xpath,
                                                                           java.lang.String attributeName,
                                                                           java.lang.String attributeValue)
                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_check_element_with_text_exists

        @When("^I check element (.+) with text (.+) exists$")
        public void i_check_element_with_text_exists​(java.lang.String locatorPath,
                                                     java.lang.String text)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • i_check_element_with_text_data_exists

        @When("^I check element (.+) with persisted data (.+) exists$")
        public void i_check_element_with_text_data_exists​(java.lang.String locatorPath,
                                                          java.lang.String dataPath)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • check_exists

        @When("^I check element (.+) exists$")
        public void check_exists​(java.lang.String xpath)
                          throws org.openqa.selenium.NoSuchElementException
        Throws:
        org.openqa.selenium.NoSuchElementException
      • verifyWindowTitle

        @Then("^I see the window title as (.+)$")
        public void verifyWindowTitle​(java.lang.String windowName)