how to close browser after execution of all testcase or after fail of testcase
Hi,
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..
Duplicate of https://github.com/juliemr/minijasminenode/issues/20
You should not need to explicitly close the browser - it will close itself when your testcase is finished.
Sorry julimer, I think my question is wrong, I want to ask that I want to do something, after each describe(not after each testcase), is there any way to do this? actually i have take close as an example, but i might have required to do some other task also, after each describe, is there any way to do this, i have require something like after block like afterEach block, please help...
Thanks,
I have found solution of my problem,
by using jasmine-beforeall nodejs module we can use beforeAll and afterAll for each describe
https://github.com/nonplus/jasmine-beforeAll
@rajit-daffodil , Can you help me how to use with my script using jasmine 2 framework https://github.com/nonplus/jasmine-beforeAll