Package com.codeborne.selenide.impl
Record Class WebDriverInstance
java.lang.Object
java.lang.Record
com.codeborne.selenide.impl.WebDriverInstance
- All Implemented Interfaces:
Disposable
@ParametersAreNonnullByDefault
public record WebDriverInstance(Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder)
extends Record
implements Disposable
An instance of webdriver with its resources: config, proxy and downloads folder.
- Since:
- 6.7.2
-
Constructor Summary
ConstructorDescriptionWebDriverInstance
(Config config, org.openqa.selenium.WebDriver webDriver, SelenideProxyServer proxy, DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstance
record class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()
Returns the value of theconfig
record component.void
dispose()
Returns the value of thedownloadsFolder
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.proxy()
Returns the value of theproxy
record component.final String
toString()
Returns a string representation of this record class.org.openqa.selenium.WebDriver
Returns the value of thewebDriver
record component.
-
Constructor Details
-
WebDriverInstance
public WebDriverInstance(Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstance
record class.- Parameters:
config
- the value for theconfig
record componentwebDriver
- the value for thewebDriver
record componentproxy
- the value for theproxy
record componentdownloadsFolder
- the value for thedownloadsFolder
record component
-
-
Method Details
-
proxy
Returns the value of theproxy
record component.- Returns:
- the value of the
proxy
record component
-
dispose
public void dispose()- Specified by:
dispose
in interfaceDisposable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
config
Returns the value of theconfig
record component.- Returns:
- the value of the
config
record component
-
webDriver
public org.openqa.selenium.WebDriver webDriver()Returns the value of thewebDriver
record component.- Returns:
- the value of the
webDriver
record component
-
downloadsFolder
Returns the value of thedownloadsFolder
record component.- Returns:
- the value of the
downloadsFolder
record component
-