Reputation: 539
I am able to run testcases with protractor using selenium server with angularjs
I want to close my browser after execution of all testcase or after fail of testcase,
I am able to do this by writing browser.close()
in the last testcase, but this will not work if testcase fails, is there any other way to close the browser in this case also, or is there any different name for after like afterEach
?
Thanks in advance.
Upvotes: 1
Views: 3342
Reputation: 1397
once you login check for the title of the page, if it not desired page then you can call driver.quit else continue with your exection
Upvotes: 1