Use selenium-standalone-service to automatically start and stop Selenium when running the test suite.

This commit is contained in:
Aaron Dodson
2021-06-14 17:27:01 +00:00
parent e65a396809
commit df7da795a3
4 changed files with 160 additions and 12 deletions

View File

@@ -40,14 +40,18 @@ async function runLangGeneratorInBrowser(browser, filename, codegenFn) {
async function runGeneratorsInBrowser() {
var options = {
capabilities: {
browserName: 'firefox'
browserName: 'chrome',
},
path: '/wd/hub'
services: ['selenium-standalone']
};
// Run in headless mode on Github Actions.
if (process.env.CI) {
options.capabilities['moz:firefoxOptions'] = {
args: ['-headless']
options.capabilities['goog:chromeOptions'] = {
args: ['--headless', '--no-sandbox', '--disable-dev-shm-usage', '--allow-file-access-from-files']
};
} else {
options.capabilities['goog:chromeOptions'] = {
args: ['--allow-file-access-from-files']
};
}