I am automating some test cases for an angular app. I have the following understanding with Protractor as:
- In angular apps there is no need of explicit waiting like selenium as protractor 90% commands return promises i.e. it means that protractor waits by its own.
- Protractor's function
WaitForAngularEnabled()
is by defaulttrue
.
The problem i am having is that while automating tests for my angular app, when i test my app, protractor waits (and i guess it waits for angular variable) until jasmine default time expires and all test cases fails. When I test my app as Non-Angular (change my protractor conf. settings (code attached)), all test cases work finely, but I have to explicitly add waits which results in much flaky tests. It also increases test execution time. Can anyone help me in above mentioned issue. Will be much thankful to you.
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
browser.waitForAngularEnabled(false);//Disabled angular here
browser.driver.manage().window().maximize();
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
Aucun commentaire:
Enregistrer un commentaire