blob: 069a222d12ec1002226168ca08e2ecd7f4eb7952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const chromeOptions = new chrome.Options();
let driver;
chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
beforeEach(async () => {
const builder = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions);
driver = builder.build();
});
it('loads the page', async () => {
await driver.get('http://localhost:8080');
expect(await driver.getTitle()).toEqual('SVG Element Pan & Zoom Demo');
});
afterEach(async () => {
await driver.quit();
});
|