Protractor: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined

后端 未结 3 1479
长情又很酷
长情又很酷 2021-01-17 13:55

I am trying to write some end to end tests and waned to use async and await.

configuration file

exports.config = {
    framework: \'jasmine\',
             


        
3条回答
  •  囚心锁ツ
    2021-01-17 14:04

    Earlier All I needed to add this in my script.js browser.driver.ignoreSynchronization = true;

    However adding this solved my problem. browser.waitForAngularEnabled(false);

    So altogether final script.js is

    describe('My first non angular class', function() {
        it('My function', function() {
            browser.driver.ignoreSynchronization = true;
            browser.waitForAngularEnabled(false);
            browser.driver.manage().window().maximize();
            //browser.get('http://juliemr.github.io/protractor-demo/');
            browser.driver.get('https://stackoverflow.com/users/login');
            element(by.id('email')).sendKeys('6');
    
        })
    
    }) 
    

提交回复
热议问题