Class BrowseTheWeb
java.lang.Object
org.shakespeareframework.selenium.BrowseTheWeb
- All Implemented Interfaces:
AutoCloseable
,org.shakespeareframework.Ability
@NullMarked
public final class BrowseTheWeb
extends Object
implements org.shakespeareframework.Ability, AutoCloseable
Ability
to browse the web using a Selenium WebDriver
.-
Constructor Summary
ConstructorsConstructorDescriptionBrowseTheWeb
(WebDriverSupplier webDriverSupplier) BrowseTheWeb
(WebDriverSupplier webDriverSupplier, String baseUrl) -
Method Summary
-
Constructor Details
-
BrowseTheWeb
- Parameters:
webDriverSupplier
- theWebDriverSupplier
used to setup theWebDriver
baseUrl
- a URL to be opened automatically
-
BrowseTheWeb
- Parameters:
webDriverSupplier
- theWebDriverSupplier
used to setup theWebDriver
-
-
Method Details
-
getWebDriver
public org.openqa.selenium.WebDriver getWebDriver()Gets theWebDriver
from thewebDriverSupplier
and returns it.If a
baseUrl
is given, it will be opened automatically.- Returns:
- a
WebDriver
instance. - See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
toString
-