If error close the existing browser and open new browser?

Hi,
The scenario is i login into a webpage using username and password and click submit and in that fill no of forms one by one. Some time the process has issue and stops work so I have used inside the retry scope activity. The problem is when problem occurs a new web page opens by this any error the no of browser opened becomes many so instead of opening multiple browser. Any error close that browser and open new browser? By this only 1 browser is Running
How can this be implemented?

Thanks in advance

1 Like

Hey @Manish_Mathias

You can do it in two ways…

  1. Either close the browser at the end of every transaction no matter it’s a success or failure (Use soft close by Close Activities if that fails you can kill the process.

  2. Kill the browser app before you start the new transaction using Kill Process activity

Hope this helps

Thanks
#nK

1 Like

@Nithinkrishna this is ok but everytime I need close browser open browser and login again it takes longer. Only on error or when page is unresponsive i need close the browser and open new browser

1 Like

Hey @Manish_Mathias

Whatever I suggested is only for exception scenarios and for the first transaction.

If you use Reframework this behaviour exist by default.

If you are not using framework, you may need to build conditions accordingly.

Thanks
#nK

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.