超时等待量角器与50001ms后的页面同步 [英] Timed out waiting for Protractor to synchronize with the page after 50001ms

查看:216
本文介绍了超时等待量角器与50001ms后的页面同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试AngularJS应用程序,并很新的量角器。每天,它就会打开,然后一次我打开浏览器,等待超时投掷CMD下面的错误了。

I am testing AngularJS app and very new to protractor. Every time I open the browser, it gets opened and then waits for the timeout before throwing the following error on cmd.

超时等待量角器与50001ms后页

我曾尝试增加超时限制,但总是得到这个错误。
我一直在使用所有这些也尝试:

I have tried increasing the timeout limit, but always get this error. I have also tried using all of these:

        browser.ignoreSynchronization = true;
        browser.driver.sleep(5000);
        browser.debugger();
        browser.waitForAngular();

该页面加载正确,如果我使用Eclipse和硒与按钮对象交互,它只是正常工作。

The page loads properly and if I use Eclipse and Selenium to interact with button objects, it just works fine.

只有量角器是有同步的问题。请帮助。

Only protractor is having Sync issues. Please Help.

推荐答案

可能的原因量角器会超时:

Possible reasons why Protractor would time out:


  1. 您的网页不按照预期的方式实现角度(即与 NG-应用标记)。更多的时候,你会在这种情况下得到的错误是角不是网页上找到,,但超时是不是出了问题。使用 ignoreSynchronization 将解决这个问题,如果它是这个问题,所以这个人是不是你。

  2. 一个HTTP请求被挂起或失败。打开你的开发者控制台,并检查网络选项卡页面加载时用量角器(可能与量角器,而不是在一个手工测试发生)。如果你发现一些故障,请确保您正确发出请求。例如,如果你想通过HTTPS访问HTTP端点,它是绝对有可能,该请求将失败和量角器会超时。

  3. 您的网页是 $超时 $ HTTP 重复投票。直到角度已经达到了休息状态(所有元素和数据绑定加载和所有请求都返回)量角器不会做任何事情。

  1. Your web page doesn't implement Angular in an expected way (i.e. with an ng-app on the body tag). More often, the error you will get in this case is Angular not found on page, but a timeout isn't out of the question. Using ignoreSynchronization would fix this if it were the issue, so this one isn't you.
  2. An HTTP request is pending or fails. Open up your dev console and check the "Network" tab when the page loads with Protractor (it may happen with Protractor and not in a manual test). If you find something failing, make sure you are issuing the request correctly. For example, if you're trying to access an HTTP endpoint through HTTPS, it's definitely possible that the request would fail and Protractor would time out.
  3. Your page is polling $timeout or $http repeatedly. Protractor won't do anything until Angular has reached a "resting" state (all elements and data bindings are loaded and all requests have returned).

超时原因的正式名单是在这里: https://开头的github .COM /角/量角器/ BLOB /主/文档/ timeouts.md

The official list of timeout reasons is here: https://github.com/angular/protractor/blob/master/docs/timeouts.md.

但是,如果你检查的Javascript控制台,网络请求的页面加载,你应该能够找出什么是错的。祝你好运!

But if you check the Javascript console and Network requests as the page loads, you should be able to figure out what's wrong. Good luck!

这篇关于超时等待量角器与50001ms后的页面同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆