Package at.willhaben.willtest.config
Class TimeoutsConfigurationParticipant<D extends org.openqa.selenium.WebDriver>
- java.lang.Object
-
- at.willhaben.willtest.config.TimeoutsConfigurationParticipant<D>
-
- 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 usingwebDriver.manage().timeouts(). Please note, that if some of the 3 timeouts are not defined, then it will use the defaults settings of the givenWebDriverimplementation.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 Summary
Constructors Constructor Description TimeoutsConfigurationParticipant()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends SeleniumProvider<T,D>>
TaddTo(T seleniumProvider)Deprecated.Adds this configurator to the givenSeleniumProviderjava.util.Optional<java.time.Duration>getImplicitWait()Deprecated.Returns the current implicit wait in milliseconds.java.util.Optional<java.time.Duration>getPageLoadTimeout()Deprecated.Returns the current page load timeout in milliseconds.java.util.Optional<java.time.Duration>getScriptTimeout()Deprecated.Returns the current script timeout in milliseconds.voidpostConstruct(D webDriver)Deprecated.Can make some changes on a newly createdWebDriverbefore it gets used.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.TimeoutsConfigurationParticipant<D>withImplicitWait(java.time.Duration implicitWait)Deprecated.SeeWebDriver.Timeouts.implicitlyWait(long, TimeUnit)TimeoutsConfigurationParticipant<D>withoutImplicitWait()Deprecated.This will reset implicit wait to theWebDriverimplementation defaultTimeoutsConfigurationParticipant<D>withoutPageLoadTimeout()Deprecated.This will reset page load timeout to theWebDriverimplementation defaultTimeoutsConfigurationParticipant<D>withoutScriptTimeout()Deprecated.This will reset script timeout to theWebDriverimplementation defaultTimeoutsConfigurationParticipant<D>withPageLoadTimeout(java.time.Duration pageLoadTimeout)Deprecated.SeeWebDriver.Timeouts.pageLoadTimeout(long, TimeUnit)TimeoutsConfigurationParticipant<D>withScriptTimeout(java.time.Duration scriptTimeout)Deprecated.SeeWebDriver.Timeouts.setScriptTimeout(long, TimeUnit)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface at.willhaben.willtest.config.WebDriverConfigurationParticipant
addDesiredCapabilities
-
-
-
-
Method Detail
-
postConstruct
public void postConstruct(D webDriver)
Deprecated.Description copied from interface:WebDriverConfigurationParticipantCan make some changes on a newly createdWebDriverbefore it gets used.- Specified by:
postConstructin interfaceWebDriverConfigurationParticipant<D extends org.openqa.selenium.WebDriver>- Parameters:
webDriver- webdriver to be changed
-
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 usedseconds- timeout in seconds- Returns:
- a
Waitinstance, 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 givenSeleniumProvider- Type Parameters:
T- type of the selenium provider- Parameters:
seleniumProvider- "this" will be added as configuration participant to the given provider- Returns:
seleniumProviderto enable method chaining
-
withImplicitWait
public TimeoutsConfigurationParticipant<D> withImplicitWait(java.time.Duration implicitWait)
Deprecated.SeeWebDriver.Timeouts.implicitlyWait(long, TimeUnit)- Parameters:
implicitWait- duration- Returns:
- this to enable method chaining
-
withScriptTimeout
public TimeoutsConfigurationParticipant<D> withScriptTimeout(java.time.Duration scriptTimeout)
Deprecated.SeeWebDriver.Timeouts.setScriptTimeout(long, TimeUnit)- Parameters:
scriptTimeout- duration- Returns:
- this to enable method chaining
-
withPageLoadTimeout
public TimeoutsConfigurationParticipant<D> withPageLoadTimeout(java.time.Duration pageLoadTimeout)
Deprecated.SeeWebDriver.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 theWebDriverimplementation default- Returns:
- this to enable method chaining
-
withoutPageLoadTimeout
public TimeoutsConfigurationParticipant<D> withoutPageLoadTimeout()
Deprecated.This will reset page load timeout to theWebDriverimplementation default- Returns:
- this to enable method chaining
-
withoutScriptTimeout
public TimeoutsConfigurationParticipant<D> withoutScriptTimeout()
Deprecated.This will reset script timeout to theWebDriverimplementation default- Returns:
- this to enable method chaining
-
-