How can I close a browser window with WebDriver.io?

Ok. Thank you. Will take your advice on it.

1 Like

Oh thats the reason why this didnā€™t work. I was struggling with the solution and was about to ping you. Thank you. Will keep the suggestion in mind.

1 Like

Sure. Just note that security should not be breached. So instead of workarounds, its better to stick to the optimal method

I have a spec file with 3 it block, which should run one by one Now I want to close the browser in first it block and I want second it block should run as it is But I am getting error invalid session id Can you help here @rishabhps