Class TimeoutsConfigurationParticipant<D extends org.openqa.selenium.WebDriver>

  • All Implemented Interfaces:
    WebDriverConfigurationParticipant<D>

    @Deprecated
    public class TimeoutsConfigurationParticipant<D extends org.openqa.selenium.WebDriver>
    extends java.lang.Object
    implements WebDriverConfigurationParticipant<D>
    Deprecated.
    Adjusts timeouts available by using webDriver.manage().timeouts(). Please note, that if some of the 3 timeouts are not defined, then it will use the defaults settings of the given WebDriver implementation.

    If all timeouts are set through this class, then there is a possibility to get the current timeout settings of the WebDriver, which is not possible out of the box in Selenium.

    • Constructor Detail

      • TimeoutsConfigurationParticipant

        public TimeoutsConfigurationParticipant()
        Deprecated.
    • Method Detail

      • getImplicitWait

        public java.util.Optional<java.time.Duration> getImplicitWait()
        Deprecated.
        Returns the current implicit wait in milliseconds. If some code changes the timeout directly, this value can be incorrect. Always set timeouts using this class.
        Returns:
        implicit wait if any defined
      • getScriptTimeout

        public java.util.Optional<java.time.Duration> getScriptTimeout()
        Deprecated.
        Returns the current script timeout in milliseconds. If some code changes the timeout directly, this value can be incorrect. Always set timeouts using this class.
        Returns:
        script timeout if any defined
      • getPageLoadTimeout

        public java.util.Optional<java.time.Duration> getPageLoadTimeout()
        Deprecated.
        Returns the current page load timeout in milliseconds. If some code changes the timeout directly, this value can be incorrect. Always set timeouts using this class.
        Returns:
        page load timeout if any defined
      • waitOverridingImplicitWait

        public org.openqa.selenium.support.ui.Wait<org.openqa.selenium.WebDriver> waitOverridingImplicitWait​(org.openqa.selenium.WebDriver webDriver,
                                                                                                             int seconds)
        Deprecated.
        If there is an implicit wait set, then you might need to wait for a shorter period. This method makes it possible with setting the implicit wait temporarily to 0.
        Parameters:
        webDriver - webdriver to be used
        seconds - timeout in seconds
        Returns:
        a Wait instance, which set the implicit wait temporarily to 0.
      • addTo

        public <T extends SeleniumProvider<T,​D>> T addTo​(T seleniumProvider)
        Deprecated.
        Adds this configurator to the given SeleniumProvider
        Type Parameters:
        T - type of the selenium provider
        Parameters:
        seleniumProvider - "this" will be added as configuration participant to the given provider
        Returns:
        seleniumProvider to enable method chaining
      • withImplicitWait

        public TimeoutsConfigurationParticipant<D> withImplicitWait​(java.time.Duration implicitWait)
        Deprecated.
        See WebDriver.Timeouts.implicitlyWait(long, TimeUnit)
        Parameters:
        implicitWait - duration
        Returns:
        this to enable method chaining
      • withScriptTimeout

        public TimeoutsConfigurationParticipant<D> withScriptTimeout​(java.time.Duration scriptTimeout)
        Deprecated.
        See WebDriver.Timeouts.setScriptTimeout(long, TimeUnit)
        Parameters:
        scriptTimeout - duration
        Returns:
        this to enable method chaining
      • withPageLoadTimeout

        public TimeoutsConfigurationParticipant<D> withPageLoadTimeout​(java.time.Duration pageLoadTimeout)
        Deprecated.
        See WebDriver.Timeouts.pageLoadTimeout(long, TimeUnit)
        Parameters:
        pageLoadTimeout - duration
        Returns:
        this to enable method chaining
      • withoutImplicitWait

        public TimeoutsConfigurationParticipant<D> withoutImplicitWait()
        Deprecated.
        This will reset implicit wait to the WebDriver implementation default
        Returns:
        this to enable method chaining
      • withoutPageLoadTimeout

        public TimeoutsConfigurationParticipant<D> withoutPageLoadTimeout()
        Deprecated.
        This will reset page load timeout to the WebDriver implementation default
        Returns:
        this to enable method chaining
      • withoutScriptTimeout

        public TimeoutsConfigurationParticipant<D> withoutScriptTimeout()
        Deprecated.
        This will reset script timeout to the WebDriver implementation default
        Returns:
        this to enable method chaining