Class FluentAdapter

    • Constructor Detail

      • FluentAdapter

        public FluentAdapter()
        Creates a new fluent adapter.
      • FluentAdapter

        public FluentAdapter​(FluentControlContainer controlContainer)
        Creates a new fluent adapter, using given control interface container.
        Parameters:
        controlContainer - control interface container
      • FluentAdapter

        public FluentAdapter​(FluentControlContainer controlContainer,
                             Class clazz)
        Creates a new fluent adapter, using given control interface container.
        Parameters:
        controlContainer - control interface container
        clazz - class from which annotation configuration will be looked up
    • Method Detail

      • getDriver

        public final org.openqa.selenium.WebDriver getDriver()
        Description copied from interface: SeleniumDriverControl
        Get the actual underlying Selenium WebDriver.

        To customize the WebDriver, you should configure FluentControlImpl.getWebDriver() or override newWebDriver().

        This method can't be override to customize the WebDriver.

        Returns:
        The actual underlying Selenium WebDriver
      • initFluent

        public void initFluent​(org.openqa.selenium.WebDriver webDriver)
        Load a WebDriver into this adapter.

        This method should not be called by end user.

        Parameters:
        webDriver - webDriver to use.
        Throws:
        IllegalStateException - when trying to register a different webDriver that the current one.
      • releaseFluent

        public void releaseFluent()
        Release the current WebDriver from this adapter.

        This method should not be called by end user.

      • newWebDriver

        public org.openqa.selenium.WebDriver newWebDriver()
        Creates a new WebDriver instance.

        This method should not be called by end user, but may be overriden if required.

        Before overriding this method, you should consider using WebDrivers registry and configuration ConfigurationProperties.getWebDriver().

        To retrieve the current managed WebDriver, call getDriver() instead.

        Returns:
        A new WebDriver instance.
        See Also:
        getDriver()