Protractor: can I continue the test if I close the browser earlier?

I have a question: is it possible to continue the execution of one test if I have a previously closed browser?

For example, I want to check if a user is registered in my application, even when I restart the browser. I want to check this with the Remember Me checkbox and without it.

After logging in my user system in the application, I will try:

browser.close(); 

but the test ends and cannot be continued. If I try with this:

 browser.get(""); browser.get("about:blank"); 

only the empty tab is open and verification is completed. If I try:

 browser.quit(); 

than the whole session is killed and the test is completed,

If someone knows a solution or has some ideas, answer. thanks

+6
source share
1 answer

You can do this with the next version of Protractor, which includes the new browser.forkNewDriverInstance function. This allows you to create a new instance of your browser through webdriver. For more information, see Commit ( https://github.com/angular/protractor/commit/0bbfd2b6d38392938781d846ad37b5a0fd964004 ).

+2
source

Source: https://habr.com/ru/post/969859/


All Articles