2016-03-02 43 views
1

我量角器的conf看起来是这样的:超时错误:在量角器的conf真正

exports.config = { 
    seleniumServerJar: "../node_modules/protractor/selenium/selenium-server-standalone-2.51.0.jar", 
    seleniumPort: 4444, 
    baseUrl: baseUrl, 
    specs: specs, 
    untrackOutstandingTimeouts:true, 
    jasmineNodeOpts: { 
    showColors: true, 
    defaultTimeoutInterval: 3600000 
    }, 

    framework: "jasmine2" 
} 

我想执行的角度页上的行动,但失败,错误 -

Failed: Timed out waiting for Protractor to synchronize with the page after 150 seconds. 
Please see https://github.com/angular/protractor/blob/master/docs/faq.md. 
The following tasks were pending: 
- $http: /api/v1/query/tail/242ac110002-8/1h?t=1456925874600 

我已经加入untrackOutstandingTimeouts:true在量角器conf中,仍然出现以上错误。

Protractor Version - 3.1.1 
Node version - 4.3.1 
Selenium-webdriver - 2.51.0 

在此先感谢!

+0

untrackOutstandingTimeouts解决上述问题:真的是$超时,我得到错误的$ HTTP。我如何处理$ http? – rohitkadam19

回答

1

能够使用browser.ignoreSynchronization

browser.get('/'); 
browser.ignoreSynchronization=true; 

//Go to page where $http and $timeout is added 
//Perform any action, steps here 

browser.sleep(5000); //This can be replace with wait condition 

browser.ignoresynchronization=false