Having problems restarting Edge process after killing the process
Posted: Tue Mar 17, 2020 2:40 pm
Hi,
I was wondering if anyone has run into this or something similar. Using Ranorex 9.3 on Windows 10.
As part of my process of running an automated script, I first check if there are any browsers running, and if so I kill their processes. For the new Edge, I look for 'msedge', and if found kill it.
The first time I run a script, on a system that has been rebooted, my script runs fine, likely because there are no 'msedge' processes running yet. The general process is as follows:
(Note: scripts are created in visual studio, using the Ranorex API, but this really has nothing to do with Ranorex as this code is all straight forward vb.NET)
1) Pre-cleanup: Look for and kill any process that is of 'msedge'
2) Start the process 'msedge' using the code System.Diagnostics.Process.Start("msedge", "about:blank")
3) Do the steps of the automated script
4) The script passes and the Edge browser is gracefully closed by signing out, or the script fails and the browser remains open
5) Post-cleanup: Look for and kill any process that is of 'msedge' (regardless of pass or fail in step 4). Note even if it gracefully closes the browser, there are still many msedge processes running in the task manager, so all these are killed.
The second time I run my script and get to my second step, OR if I manually try to start the process by double-clicking the icon, it will not start.
I don't have this problem with any other browser (Chrome, FireFox or IE) using the same code.
Any suggestions? Is there any other process running that I should also kill? I notice that when Edge starts, it starts many msedge processes, and all these are killed by my scripts. Any Edge settings?
Thanks for any help,
Aracknid
I was wondering if anyone has run into this or something similar. Using Ranorex 9.3 on Windows 10.
As part of my process of running an automated script, I first check if there are any browsers running, and if so I kill their processes. For the new Edge, I look for 'msedge', and if found kill it.
The first time I run a script, on a system that has been rebooted, my script runs fine, likely because there are no 'msedge' processes running yet. The general process is as follows:
(Note: scripts are created in visual studio, using the Ranorex API, but this really has nothing to do with Ranorex as this code is all straight forward vb.NET)
1) Pre-cleanup: Look for and kill any process that is of 'msedge'
2) Start the process 'msedge' using the code System.Diagnostics.Process.Start("msedge", "about:blank")
3) Do the steps of the automated script
4) The script passes and the Edge browser is gracefully closed by signing out, or the script fails and the browser remains open
5) Post-cleanup: Look for and kill any process that is of 'msedge' (regardless of pass or fail in step 4). Note even if it gracefully closes the browser, there are still many msedge processes running in the task manager, so all these are killed.
The second time I run my script and get to my second step, OR if I manually try to start the process by double-clicking the icon, it will not start.
I don't have this problem with any other browser (Chrome, FireFox or IE) using the same code.
Any suggestions? Is there any other process running that I should also kill? I notice that when Edge starts, it starts many msedge processes, and all these are killed by my scripts. Any Edge settings?
Thanks for any help,
Aracknid