Playback the script (function: repeatedly open and close the browser) , unexpected dialog popup
Playback the script (function: repeatedly open and close the browser) , unexpected Message will be popup.
----------------------------------------------
The message of the unexpected dialog:
Firefox:
Firefox safe mode
Firefox was accidentally switched off at boot time. This could be due to additional components or other reasons.
You can try troubleshooting in safe mode to solve this problem.You can also skip troubleshooting and try to refurbish Firefox.
Chrome:
Restore pages?
Chrome didn't shut down correctly.
----------------------------------------------
The problem does not happen with IE/Edge.
Please check the attachment(file b) in detail.
Looking forward for your reply.
Thank you.
---Steven Wang
Hi,
I would recommend to consult documentation that contains a lot of useful information.
.Close() method does not return anything, so it is useless to do a verification like if (.Close()).
Also, attempting to close an application two times in a row can easily cause unpredictable behavior.
And finally, it is better to copy/paste your real code than to type it as occasional typo(s) (like TestApps, Chorme, Terminal) can easily mislead others.
The code from the sample provided in the help for the .Close() method adopted to your case may look like this:
p = TestedApps.Chrome; // Closes the process p.Close(10000); // Checks whether the process is closed if (p.Exists) { Log.Warning(p.ProcessName + " seems to hang, terminating."); p.SaveDumpToLog(); // Terminates the process p.Terminate(); }