Trait declaring a webDriver field that enables tests to be abstracted across different kinds of WebDrivers.
This trait enables you to place tests that you want to run in multiple browsers in a trait with a self type of
WebBrowser with Driver, like this:
trait MyBrowserTests {
this: WebBrowser with Driver =>
// Your browser tests
}
Then you can create concrete subclasses for each actual browser you want to run those tests in:
class MyBrowserTestsWithChrome extends MyBrowserTests with Chrome
class MyBrowserTestsWithSafari extends MyBrowserTests with Safari
class MyBrowserTestsWithInternetExplorer extends MyBrowserTests with InternetExplorer
class MyBrowserTestsWithFirefox extends MyBrowserTests with Firefox
Trait declaring a
webDriverfield that enables tests to be abstracted across different kinds ofWebDrivers.This trait enables you to place tests that you want to run in multiple browsers in a trait with a self type of
WebBrowser with Driver, like this:trait MyBrowserTests { this: WebBrowser with Driver => // Your browser tests }Then you can create concrete subclasses for each actual browser you want to run those tests in: