Reputation: 65
i am using protractor with cucumber-js to automate angular-js application. Have followed the structure, as specified in github cucumber-js framework.
features step_definitions support pages
on executing the code through gulpfile feature file are calling the respective steps. While running protractor does not wait for page to load and keeps moving to further steps.
so here the questions is why protractor is not waiting for application to load even though i have specified browser.sleep(5000) tried couple of methods:
browser.ignoreSynchronization=true;
browser.get("appurl");
browser.sleep(5000);
browser.findElements(by.xpath("")).click();
tried with below code too, but no luck
browser.ignoreSynchronization=false;
browser.get("appurl")
browser.sleep(5000)
browser.findElements(by.xpath("")).click();
I tried with expectedconditions with promises as well, but still no success.
I run script using gulpfile. Script works without throwing any errors, however no actions are simulated n finally browser gets killed. not sure if i am missing any steps here.
please advise...
Upvotes: 0
Views: 42
Reputation: 1643
browser.ignoreSynchronization
is deprecated. If this variable set to true
- protractor will NOT wait for angular.
For this purpose you can use waitForAngularEnabled .
I think you should remove this line browser.ignoreSynchronization=true;
and your error will go out.
Upvotes: 0