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
ConstructorsConstructorDescriptionWebDriverInstance(Config config, org.openqa.selenium.WebDriver webDriver, SelenideProxyServer proxy, DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.voiddispose()Returns the value of thedownloadsFolderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.proxy()Returns the value of theproxyrecord component.final StringtoString()Returns a string representation of this record class.org.openqa.selenium.WebDriverReturns the value of thewebDriverrecord component.
-
Constructor Details
-
WebDriverInstance
public WebDriverInstance(Config config, org.openqa.selenium.WebDriver webDriver, @Nullable SelenideProxyServer proxy, @Nullable DownloadsFolder downloadsFolder) Creates an instance of aWebDriverInstancerecord class.- Parameters:
config- the value for theconfigrecord componentwebDriver- the value for thewebDriverrecord componentproxy- the value for theproxyrecord componentdownloadsFolder- the value for thedownloadsFolderrecord component
-
-
Method Details
-
proxy
Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-
dispose
public void dispose()- Specified by:
disposein 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 theconfigrecord component.- Returns:
- the value of the
configrecord component
-
webDriver
public org.openqa.selenium.WebDriver webDriver()Returns the value of thewebDriverrecord component.- Returns:
- the value of the
webDriverrecord component
-
downloadsFolder
Returns the value of thedownloadsFolderrecord component.- Returns:
- the value of the
downloadsFolderrecord component
-