Browser Launchers: Selenium
Run tests using selenium-webdriver.
For testing on modern browsers, we don't recommend using Selenium, as it does not support running tests in parallel and there are better options available.
Usage
-
Make sure you have a selenium server running, either locally or remote.
-
Add the selenium launcher to your test runner config, specifying the browser builder with the necessary options:
import { seleniumLauncher } from '@web/test-runner-selenium';
import webdriver from 'selenium-webdriver';
module.exports = {
browsers: seleniumLauncher({
driverBuilder: new webdriver.Builder()
.forBrowser('chrome')
.setChromeOptions(new ChromeOptions().headless())
.usingServer('http://localhost:4444/wd/hub'),
}),
};