const puppeteer = require("puppeteer")
const expect = require("chai").expect

let browser;
let page;


before(async () => {
    browser = await puppeteer.launch({
        timeout: 10000,
        headless: false
    });
    page = await browser.newPage();
})

after(() => {
    return browser.close()
})

describe("Session id2", function() {
    this.timeout(15000);
    it('Exploration 0', async () => {
        await page.goto("https://cdiscount.com", {
            waitUntil: 'load'
        });
        await page.waitFor(".hSrcInput > input");
        await page.type(".hSrcInput > input", "smartphone");
        const elementOnFocus = await page.evaluateHandle(() => document.activeElement);
        await elementOnFocus.asElement().press("Enter");

    })
})