Protractor : How to wait for page complete after click a button?

后端 未结 9 787
抹茶落季
抹茶落季 2020-11-29 00:16

In a test spec, I need to click a button on a web page, and wait for the new page completely loaded.

emailEl.sendKeys(\'jack\');
passwordEl.sendKeys(\'123pwd         


        
9条回答
  •  鱼传尺愫
    2020-11-29 00:42

    Use this I think it's better

       *isAngularSite(false);*
        browser.get(crmUrl);
    
    
        login.username.sendKeys(username);
        login.password.sendKeys(password);
        login.submit.click();
    
        *isAngularSite(true);*
    

    For you to use this setting of isAngularSite should put this in your protractor.conf.js here:

            global.isAngularSite = function(flag) {
            browser.ignoreSynchronization = !flag;
            };
    

提交回复
热议问题