Error: timeout until Transcavator syncs with the page

I am facing a very strange problem. During my first test run, I almost always get this error:

Failure: Timed out until the Transcavator syncs with the page after 50 seconds. See https://github.com/angular/protractor/blob/master/docs/faq.md

It does not somehow depend on the test content, and after several executions everything starts working fine.

My spec: Protractor 2.1.0 + Jasmine

This happens only for one of my projects, for others everything is just fine.

browser.ignoreSynchronization = TRUE; doesn't work in my case because this is 100% angular app.

Any ideas for the reasons? This is really weird because it mostly happens on the first run.

I also increased allScriptsTimeout: 50000, but it doesn't seem to help, nor is it a solution.

I use

rootElement: 'html'

param in my config as long as the app is defined in the html tag

+3


source to share


2 answers


You can try: browser.manage().timeouts().implicitlyWait(2000);

insideonPrepare()

I am using it for my hybrid app, maybe your angular DOM part is taking a while to load and it might help you.

EDIT: F *** comments are being edited :)



I guess you could hack it with the beforeEach () function, or use it in your first test if it only happens then that would have something like this:

dvr = browser.driver; 
browser.ignoreSynchronization = true;
dvr.wait(function() { 
    return browser.driver.isElementPresent(by.css('.ngscope')); }, 30000); //or any other angular element detection
browser.ignoreSynchronization = false;

      

Also I remember that sometimes webdriver loses the focus of the browser window on startup (I didn't see it in transporter, but this happened to me before with different frameworks), and changing the browser resolution helped browser.manage().window().setSize(1280, 1024);

)

0


source


I also faced the same problem but after increasing the running time it worked for me

allScriptsTimeout: 72000 and try to add below lines



jasmineNodeOpts: {isVerbose: true, includeStackTrace: true, showColors: true, defaultTimeoutInterval: 72000}

0


source







All Articles