Package com.codeborne.selenide.impl
Record Class WebDriverInstance
java.lang.Object
java.lang.Record
com.codeborne.selenide.impl.WebDriverInstance
- All Implemented Interfaces:
Disposable
public record WebDriverInstance(long threadId, 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.
-
Constructor Summary
ConstructorDescriptionWebDriverInstance
(long threadId, Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstance
record class.WebDriverInstance
(Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder) -
Method Summary
Modifier and TypeMethodDescriptionconfig()
Returns the value of theconfig
record component.void
dispose()
@Nullable DownloadsFolder
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.long
threadId()
Returns the value of thethreadId
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) -
WebDriverInstance
public WebDriverInstance(long threadId, Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstance
record class.- Parameters:
threadId
- the value for thethreadId
record componentconfig
- 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
threadId
public long threadId()Returns the value of thethreadId
record component.- Returns:
- the value of the
threadId
record component
-
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
-