Protractor 量角器测试在Chrome上超时,但在FF上未超时

Protractor 量角器测试在Chrome上超时,但在FF上未超时,protractor,selenium-chromedriver,angularjs-e2e,Protractor,Selenium Chromedriver,Angularjs E2e,我在做量角器测试。 有一个不是角度的登录部分,然后是角度部分的主页。 在通过Chrome上的登录部分后,我得到一个超时,但在FF上它继续成功。 它以前也在Chrome上运行,一个使用Robot框架的朋友甚至在使用Chrome时也不会超时 错误消息: timeout: timed out after 30000 msec waiting for spec to complete 我还尝试添加 defaultTimeoutInterval: 360000 但这没用。只是一直等着 config

我在做量角器测试。 有一个不是角度的登录部分,然后是角度部分的主页。 在通过Chrome上的登录部分后,我得到一个超时,但在FF上它继续成功。 它以前也在Chrome上运行,一个使用Robot框架的朋友甚至在使用Chrome时也不会超时

错误消息:

 timeout: timed out after 30000 msec waiting for spec to complete 
我还尝试添加

defaultTimeoutInterval: 360000
但这没用。只是一直等着

config.js:

exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',

capabilities: {
    'browserName': 'chrome'
    // 'browserName': 'firefox' 
},

specs: ['*/loginEAPTest.js'],

params: {
    login: {
        user: '****',
        password: '****'
    }
},

resultJsonOutputFile: 'TestResults/Test.js',

jasmineNodeOpts: {
    isVerbose: true,
    showColors: true,
    //defaultTimeoutInterval: 360000,
    includeStackTrace: true
},


onPrepare: function() {


// for non-angular page
 browser.ignoreSynchronization = true;

}

};
loginEAPTest.js:

var LoginPage = require('../global/LoginPage');
var capture = require('../global/screenshots');

describe('login Testing', function () {

var login = new LoginPage();

beforeEach(function(){

        login.get();
        login.justClickLogin();
    }
);

it('Should login using Email & Password', function () {
browser.sleep(10000);
  browser.driver.findElement(by.id('userName_str')).sendKeys ("****");
   browser.driver.findElement(by.id('password')).sendKeys("******");
   browser.driver.findElement(by.xpath("//input[contains(@value,'Log In')]")).click();
browser.ignoreSynchronization = false;
browser.sleep(5000);
browser.switchTo().defaultContent();
expect(element(by.css('[data-ui-sref=myApps]')).isDisplayed()).toBe(true);
});
});
LoginPage.js相关部分:

   this.justClickLogin = function() {
    var loginObj = this;
    loginObj.signInButton.click().then(function () {
        console.log("press login");
        var loginframe = element(by.tagName('iframe'));
        console.log("before switch");
        browser.switchTo().frame(0);
        console.log("after switch");
        browser.sleep(4000);


    });

};

谢谢。

哪一行发生超时?感谢.between browser.switchTo.defaultContent;到expectelementby.css“[data ui sref=myApps]”。isDisplayed.toBetrue;