lundi 1 octobre 2018

Protactor E2E: Check if a new window is displayed or get the new window url

i have some troubles with the following test:

it('Should verify new window url', function () {
    page.list.get(0).click().then(function () {
        browser.getAllWindowHandles().then(function (handles) {
            newWindowHandle = handles[0];
            browser.switchTo().window(newWindowHandle).then(function () {
            expect(browser.getCurrentUrl()).toMatch(/\/url/);
            });
        });
    });
});

I get this error: Cannot read property get of undefined.

Aucun commentaire:

Enregistrer un commentaire