This problem should apply to requirejs as well.
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.
What is the proper way to use Protractor with SystemJS?
Files required by ProtractorThe test code is written by using the syntax of our testing framework. For example, if we are using Jasmine framework, then the test code will be written by using the syntax of Jasmine. This file will contain all the functional flows and assertions of the test.
These don't sound like issues specific to SystemJS.
Rather, in my experience, they are pretty much the joys of working with Protractor.
Things the you can do to mitigate the issues however include:
browser.manage().timeouts().implicitlyWait(5000);
before any tests run. Perhaps in your protractor onPrepare
config methodbrowser.waitForAngular();
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With