-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathpageLoading.spec.js
46 lines (37 loc) · 1.44 KB
/
pageLoading.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const Chrome = require('selenium-webdriver/chrome');
const {Browser, Builder} = require("selenium-webdriver");
const options = new Chrome.Options()
describe('Page loading strategies', function () {
it('Navigate using eager page loading strategy', async function () {
let driver = new Builder()
.forBrowser(Browser.CHROME)
.setChromeOptions(options.setPageLoadStrategy('eager'))
.build();
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
await driver.quit();
});
it('Navigate using none page loading strategy', async function () {
let driver = new Builder()
.forBrowser(Browser.CHROME)
.setChromeOptions(options.setPageLoadStrategy('none'))
.build();
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
await driver.quit();
});
it('Navigate using normal page loading strategy', async function () {
let driver = new Builder()
.forBrowser(Browser.CHROME)
.setChromeOptions(options.setPageLoadStrategy('normal'))
.build();
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
await driver.quit();
});
it('Should be able to accept certs', async function () {
let driver = new Builder()
.forBrowser(Browser.CHROME)
.setChromeOptions(options.setAcceptInsecureCerts(true))
.build();
await driver.get('https://www.selenium.dev/selenium/web/blank.html');
await driver.quit();
});
});