Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException with an appropriate error message and, optionally, cause.
Throws UnsupportedOperationException with an appropriate error message and, optionally, cause.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
Throws UnsupportedOperationException.
An implementation of
WebDriverthat provides an optional exception and an error message and throwsUnsupportedOperationExceptionfrom all of its other methods, used when a requested SeleniumWebDriveris unavailable on the host platform.Traits OneBrowserPerSuite, OneBrowserPerTest, AllBrowsersPerTest, and MixedFixtures check if the requested
WebDriveris available, and if not, installs this driver (to avoid initializing withnull) and cancels the tests.This is an example of the "Null Object Pattern." We use this pattern to avoid initializing with
nullinstead of making the driver type anOption[WebDriver]for two reasons: 1) the type of the implicit needed by Selenium isWebDriver, notOption[WebDriver], and 2) the Null Object we provide also carries an optional exception and user-friendly error message.