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- theWebDriverSupplierused to setup theWebDriverbaseUrl- a URL to be opened automatically
-
BrowseTheWeb
- Parameters:
webDriverSupplier- theWebDriverSupplierused to setup theWebDriver
-
-
Method Details
-
getWebDriver
public org.openqa.selenium.WebDriver getWebDriver()Gets theWebDriverfrom thewebDriverSupplierand returns it.If a
baseUrlis given, it will be opened automatically.- Returns:
- a
WebDriverinstance. - See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
toString
-