puppeteer set up code

Solutions on MaxInterview for puppeteer set up code by the best coders in the world

showing results for - "puppeteer set up code"
Nicole
25 Feb 2016
1const puppeteer = require('puppeteer');
2
3describe('My First Puppeteer Test', () => {
4    it('should launch the browser', async function() {
5        const browser = await puppeteer.launch({
6             headless: false, 
7             slowMo: 100, 
8             devtools: false,
9        });
10        const page = await browser.newPage();
11        await page.goto('https://devexpress.github.io/testcafe/example/');
12        await page.type('#developer-name', 'Im a Hacker ;)', {delay: 0 });
13        await page.click('#remote-testing', { clickCount: 1 });
14        await page.click('#tried-test-cafe', { clickCount: 1 });
15        await page.click('#reusing-js-code', { clickCount: 1 });
16        await page.click('#background-parallel-testing', { clickCount: 1 });
17        await page.click('#continuous-integration-embedding', { clickCount: 1 });
18        await page.click('#traffic-markup-analysis', { clickCount: 1 });
19        await page.click('#windows', { clickCount: 1 });
20        await page.select('#preferred-interface','JavaScript API');
21        await page.waitForTimeout(3000);
22        await browser.close();
23    })
24})