Class AbstractPage

    • Constructor Detail

      • AbstractPage

        public AbstractPage​(org.openqa.selenium.WebDriver driver)
    • Method Detail

      • setPageOpeningStrategy

        public void setPageOpeningStrategy​(PageOpeningStrategy pageOpeningStrategy)
      • isPageOpened

        public boolean isPageOpened()
      • isPageOpened

        public boolean isPageOpened​(long timeout)
      • assertPageOpened

        public void assertPageOpened()
        Asserts whether page is opened or not. Inside there is a check for expected url matches actual page url. In addition if uiLoadedMarker is specified for the page it will check whether mentioned element presents on page or not.
      • assertPageOpened

        public void assertPageOpened​(long timeout)
        Asserts whether page is opened or not. Inside there is a check for expected url matches actual page url. In addition if uiLoadedMarker is specified for the page it will check whether mentioned element presents on page or not.
        Parameters:
        timeout - Completing of page loading conditions will be verified within specified timeout
      • savePageAsPdf

        public java.lang.String savePageAsPdf​(boolean scaled,
                                              java.lang.String fileName)
                                       throws java.io.IOException,
                                              com.itextpdf.text.DocumentException
        Save page as pdf
        If you want to set fileName as test name, use TestNamingService.getTestName()
        Throws:
        java.io.IOException
        com.itextpdf.text.DocumentException
      • savePageAsPdf

        public java.lang.String savePageAsPdf​(java.lang.String fileName)
                                       throws java.io.IOException,
                                              com.itextpdf.text.DocumentException
        Save page as pdf
        If you want to set fileName as test name, use TestNamingService.getTestName()
        Throws:
        java.io.IOException
        com.itextpdf.text.DocumentException
      • waitForJSToLoad

        public void waitForJSToLoad()
        Waits till JS and jQuery (if applicable for the page) are completely processed on the page
      • waitForJSToLoad

        public void waitForJSToLoad​(long timeout)
        Waits till JS and jQuery (if applicable for the page) are completely processed on the page
        Parameters:
        timeout - Completing of JS loading will be verified within specified timeout