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 throwsUnsupportedOperationExceptionfrom all of its methods, used to initialize instancevars of typeWebDriver.Traits OneBrowserPerTest, ConfiguredBrowser, AllBrowsersPerSuite, and AllBrowsersPerTest initialize their
webDriverfield with this value (to avoid initializing withnull).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) theUnsupportedOperationExceptionthrown by the methods of the Null Object we provide carries a user-friendly error message.