Interface EmbeddedBrowser

    • Method Detail

      • goToUrl

        void goToUrl​(URI url)
        Opens the url in the browser.
        Parameters:
        url - the URL.
      • fireEventAndWait

        boolean fireEventAndWait​(Eventable event)
                          throws org.openqa.selenium.ElementNotInteractableException,
                                 InterruptedException
        fires the event.
        Parameters:
        event - the event.
        Returns:
        if fails.
        Throws:
        org.openqa.selenium.ElementNotInteractableException
        InterruptedException
      • getStrippedDomWithoutIframeContent

        String getStrippedDomWithoutIframeContent()
        Returns:
        the DOM string WITHOUT the iframe content.
      • close

        void close()
        Closes the browser.
      • closeOtherWindows

        void closeOtherWindows()
        Closes all other windows.
      • goBack

        void goBack()
        Go back to the previous state.
      • executeJavaScript

        Object executeJavaScript​(String script)
                          throws CrawljaxException
        Execute JavaScript in the browser.
        Parameters:
        script - The script to execute.
        Returns:
        The JavaScript return object.
        Throws:
        CrawljaxException - On error.
      • isVisible

        boolean isVisible​(Identification identification)
        Checks if an element is visible.
        Parameters:
        identification - identification to use.
        Returns:
        true if the element is visible.
      • getCurrentUrl

        String getCurrentUrl()
        Returns:
        The current browser url.
      • getInputWithRandomValue

        FormInput getInputWithRandomValue​(FormInput inputForm)
        Parameters:
        inputForm - the input form.
        Returns:
        a FormInput filled with random data.
      • getFrameDom

        String getFrameDom​(String iframeIdentification)
        Parameters:
        iframeIdentification - the iframe's name or id.
        Returns:
        the DOM string of the corresponding iframe.
      • elementExists

        boolean elementExists​(Identification identification)
        Parameters:
        identification - the identification of the element to be checked.
        Returns:
        true if the element can be found in the browser's DOM tree.
      • getWebElement

        org.openqa.selenium.WebElement getWebElement​(Identification identification)
        Parameters:
        identification - the identification of the element to be found.
        Returns:
        the corresponding WebElement from the browser.
      • getWebDriver

        org.openqa.selenium.WebDriver getWebDriver()
        Returns:
        The selenium web driver.
      • saveScreenShot

        void saveScreenShot​(File file)
                     throws CrawljaxException
        Parameters:
        file - the file to write the screenshot to (png).
        Throws:
        CrawljaxException - if saving screenshots is not supported by the implementing class.
      • handlePopups

        void handlePopups()