[英]What is the proper way to use Protractor with SystemJS?
This problem should apply to requirejs as well. 这个问题也应适用于requirejs。
The specifics: 具体内容:
The reason I'm asking is because I have just a couple very basic cucumber tests and sometimes I get errors (inconsistently) involving timeouts or waiting to sync with the page etc. Other times my tests pass and no timeout errors are given. 我要问的原因是因为我只有几个非常基本的黄瓜测试,有时我收到涉及超时或等待与页面同步等错误(不一致)。其他时候我的测试通过了,并且没有给出超时错误。 There is not a ton of authoritative information on these problems.
关于这些问题,没有大量的权威信息。 Mainly just a bunch of SO and github issues.
主要只是一堆SO和github问题。
What is the proper way to use Protractor with SystemJS? 将Protractor与SystemJS一起使用的正确方法是什么?
These don't sound like issues specific to SystemJS. 这些听起来不像SystemJS特有的问题。
Rather, in my experience, they are pretty much the joys of working with Protractor. 而是,根据我的经验,与Protractor合作非常有趣。
Things the you can do to mitigate the issues however include: 您可以采取的缓解问题的措施包括:
browser.manage().timeouts().implicitlyWait(5000);
browser.manage().timeouts().implicitlyWait(5000);
before any tests run. onPrepare
config method onPrepare
配置方法中 browser.waitForAngular();
browser.waitForAngular();
browser.wait(protractor.ExpectedConditions.elementToBeClickable(elm), 2000);
browser.wait(protractor.ExpectedConditions.elementToBeClickable(elm), 2000);
elm.click();
You may also be interested to see that there is a new project that hopes to avoid all the pitfalls with selenium based test frameworks.. by not using selenium at all. 您可能还希望看到有一个新项目希望通过根本不使用硒来避免使用基于硒的测试框架带来的所有陷阱。 It claims to be much simpler, faster and less error-prone: https://www.cypress.io/
它声称更加简单,快捷且不易出错: https : //www.cypress.io/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.