Non-angular page opened with click - angular not defined using ignoreSynchronization or waiting for Angular without Non-angular page opened with click - angular not defined using ignoreSynchronization or waiting for Angular without selenium selenium

Non-angular page opened with click - angular not defined using ignoreSynchronization or waiting for Angular without


So much for my first question...

It appears that my use of browser.getLocationAbsUrl() is meant to be used for an Angular page, and was causing my issue...Essentially, even though I believed I was using pure Webdriver calls, that call still required Angular on the page to work...As stated in another post, the use of browser.driver.getCurrentUrl() is a non-Angular call using Webdriver, and fixed the problem. Thus, the final code is the following...

browser.sleep(1000); //to wait for the page to load        browser.driver.getAllWindowHandles().then(function(handles) {            browser.driver.switchTo().window(handles[1]).then(function() {                expect(browser.driver.getCurrentUrl()).toContain('/console/login.jsp');                expect(browser.driver.findElement(By.css('th.login')).getText()).toEqual('Login');            });        });

This works without setting ignoreSynchronization, BTW.I realized it would probably be something relatively simple to fix it, just didn't expect I'd get it that quickly (I intended on submitting the question last night, but posted it this morning instead).

In any case, I hope this will at least be a good reference for anyone else facing the same issue.


Seems like getLocationAbsUrl is angular abs url.
Try using the native driver getCurrentUrl instead.

-- expect(browser.getLocationAbsUrl()).toContain('/console/login.jsp');
++ expect(browser.driver.getCurrentUrl() ...