forked from cs3org/ocm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
24 lines (22 loc) · 757 Bytes
/
test.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
const puppeteer = require('puppeteer');
async function test () {
const browser = await puppeteer.launch({
headless: false,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
ignoreHTTPSErrors: true
});
const context = browser.defaultBrowserContext();
context.overridePermissions(undefined, ['clipboard-read']);
page = await browser.newPage();
await page.goto('https://oc1.docker/index.php/login');
await page.waitForSelector('#user');
await page.type('#user', 'alice');
await page.waitForSelector('#password');
await page.type('#password', 'alice123');
await page.waitForSelector('.login-button');
await page.click('.login-button');
await page.waitForSelector('#close-wizard');
await page.click('#close-wizard');
}
// ...
test();