I am new to writing test cases using protractor for non angular application. I wrote a sample test case.Here the browser closes automatically after running test case.How can I p
I'm sure there is a change triggered on your page by the button click. It might be something as subtle as a class change on an element or as obvious as a element with the text "Saved" displayed. What I would do is, after the test, explicitly wait for this change.
[...]
return protractor.browser.wait(function() {
return element(by.cssContainingText('p', 'Saved')).isPresent();
}, 10000);
You could add such a wait mechanism to the afterEach()
method of your spec file, so that your tests are separated even without the Protractor Angular implicit waits.