I have a question: Is it posible to continue with execution of one test, if I have earlier closed browser in it?
For example, I want to check is the user in my application logged in, even when I restart browser. I want to check that with and without "Remember me" checkbox.
After I login my user in app, I try with this:
browser.close();
but test ends and can not be continued further. If i try with this:
browser.get("");
browser.get("about:blank");
only blank tab is open, and test ends.If I try with:
browser.quit();
than whole session is killed and test is ended,
If anyone knows solution, or have some ideas, please answer. Thanks
Purpose: The close() function in ProtractorBrowser class is used to close the current instance of the browser. Note: Protractor automatically closes after the execution of all tests or specs. However, if needed user can close the current browser window forcibly using close() command.
Testing Against Multiple Browsers If you would like to test against multiple browsers, use the multiCapabilities configuration option. Protractor will run tests in parallel against each set of capabilities. Please note that if multiCapabilities is defined, the runner will ignore the capabilities configuration.
The dismiss() alert class method is used to close the alert for handling alerts in Selenium. It operates by clicking on the “X” button in the prompt. This method is functional for all alert types: prompt, alert and confirmation dialogue box. The protractor web driver uses a void dismiss() command to cancel the alert.
For Angular apps, Protractor will wait until the Angular Zone stabilizes. This means long running async operations will block your test from continuing. To work around this, run these tasks outside the Angular zone.
You'll be able to do this with the next release of Protractor, which includes the new browser.forkNewDriverInstance
function. This lets you create a new instance of your browser via webdriver. See the commit (https://github.com/angular/protractor/commit/0bbfd2b6d38392938781d846ad37b5a0fd964004) for more information.
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