Class Browser

  • All Implemented Interfaces:
    WebDevice, org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver

    public class Browser
    extends Object
    implements WebDevice
    • Method Detail

      • getBaseUrl

        public URL getBaseUrl()
      • setBaseUrl

        public void setBaseUrl​(URL baseUrl)
      • withBaseUrl

        public Browser withBaseUrl​(URL baseUrl)
      • getDefaultDevice

        public String getDefaultDevice()
      • setDefaultDevice

        public void setDefaultDevice​(String defaultDevice)
      • withDefaultDevice

        public Browser withDefaultDevice​(String defaultDevice)
      • isEager

        public boolean isEager()
      • setEager

        public void setEager​(boolean eager)
      • withEager

        public Browser withEager​(boolean eager)
      • isStrict

        public boolean isStrict()
      • setStrict

        public void setStrict​(boolean strict)
      • withStrict

        public Browser withStrict​(boolean strict)
      • initialize

        @PostConstruct
        public void initialize()
      • acquired

        public boolean acquired()
        Specified by:
        acquired in interface WebDevice
      • home

        public void home()
        Specified by:
        home in interface WebDevice
      • perform

        public <Driver extends org.openqa.selenium.WebDriver> void perform​(Consumer<Driver> consumer)
        Specified by:
        perform in interface WebDevice
      • invoke

        public <Driver extends org.openqa.selenium.WebDriver,​R> R invoke​(Function<Driver,​R> function)
        Specified by:
        invoke in interface WebDevice
      • getCapabilities

        public org.openqa.selenium.Capabilities getCapabilities()
        Specified by:
        getCapabilities in interface org.openqa.selenium.HasCapabilities
      • executeScript

        public Object executeScript​(String script,
                                    Object... args)
        Specified by:
        executeScript in interface org.openqa.selenium.JavascriptExecutor
      • executeAsyncScript

        public Object executeAsyncScript​(String script,
                                         Object... args)
        Specified by:
        executeAsyncScript in interface org.openqa.selenium.JavascriptExecutor
      • getScreenshotAs

        public <X> X getScreenshotAs​(org.openqa.selenium.OutputType<X> target)
                              throws org.openqa.selenium.WebDriverException
        Specified by:
        getScreenshotAs in interface org.openqa.selenium.TakesScreenshot
        Throws:
        org.openqa.selenium.WebDriverException
      • get

        public void get​(String url)
        Specified by:
        get in interface org.openqa.selenium.WebDriver
      • getCurrentUrl

        public String getCurrentUrl()
        Specified by:
        getCurrentUrl in interface org.openqa.selenium.WebDriver
      • getTitle

        public String getTitle()
        Specified by:
        getTitle in interface org.openqa.selenium.WebDriver
      • findElements

        public List<org.openqa.selenium.WebElement> findElements​(org.openqa.selenium.By by)
        Specified by:
        findElements in interface org.openqa.selenium.SearchContext
        Specified by:
        findElements in interface org.openqa.selenium.WebDriver
      • findElement

        public org.openqa.selenium.WebElement findElement​(org.openqa.selenium.By by)
        Specified by:
        findElement in interface org.openqa.selenium.SearchContext
        Specified by:
        findElement in interface org.openqa.selenium.WebDriver
      • getPageSource

        public String getPageSource()
        Specified by:
        getPageSource in interface org.openqa.selenium.WebDriver
      • close

        public void close()
        Specified by:
        close in interface org.openqa.selenium.WebDriver
      • quit

        public void quit()
        Specified by:
        quit in interface org.openqa.selenium.WebDriver
      • getWindowHandles

        public Set<String> getWindowHandles()
        Specified by:
        getWindowHandles in interface org.openqa.selenium.WebDriver
      • getWindowHandle

        public String getWindowHandle()
        Specified by:
        getWindowHandle in interface org.openqa.selenium.WebDriver
      • switchTo

        public org.openqa.selenium.WebDriver.TargetLocator switchTo()
        Specified by:
        switchTo in interface org.openqa.selenium.WebDriver
      • navigate

        public org.openqa.selenium.WebDriver.Navigation navigate()
        Specified by:
        navigate in interface org.openqa.selenium.WebDriver
      • manage

        public org.openqa.selenium.WebDriver.Options manage()
        Specified by:
        manage in interface org.openqa.selenium.WebDriver
      • perform

        public void perform​(Collection<org.openqa.selenium.interactions.Sequence> actions)
        Specified by:
        perform in interface org.openqa.selenium.interactions.Interactive
      • resetInputState

        public void resetInputState()
        Specified by:
        resetInputState in interface org.openqa.selenium.interactions.Interactive
      • release

        @PreDestroy
        public void release()
        Specified by:
        release in interface WebDevice