how to use Protractor on non angularjs website?

Abdelkrim picture Abdelkrim · Jan 4, 2014 · Viewed 53.1k times · Source

I have found Protractor framework which is made for AngularJS web applications.

How can I use Protractor on a website which is not using AngularJS?

I wrote my first test and Protractor triggers this message:

Error: Angular could not be found on the page https://www.stratexapp.com/ : retries looking for angular exceeded

Answer

Andrei Beziazychnyi picture Andrei Beziazychnyi · Apr 21, 2014

Another approach is to set browser.ignoreSynchronization = true before browser.get(...). Protractor wouldn't wait for Angular loaded and you could use usual element(...) syntax.

browser.ignoreSynchronization = true;
browser.get('http://localhost:8000/login.html');

element(by.id('username')).sendKeys('Jane');
element(by.id('password')).sendKeys('1234');
element(by.id('clickme')).click();