Forum Discussion
Of course, it worked once then stopped working. What I am seeing now is that the browser load appears to load which I see with the flicker of the pinned shortcut. But it does not remain loaded. Any thoughts?
Sort of a righteous bummer that the browser object is not exposed to script extensions.
Possibly the browser is still loaded and running as a hidden process... Windows 10 environments are NOTORIOUS for "suspended" applications. Before running a browser, I usually check to see if it's already running... if it is, kill the process so that, when I start the browser, it starts brand new.
- vthomeschoolmom5 years agoSuper Contributor
Yes. I did that. Alas that is not it.
- tristaanogre5 years agoEsteemed Contributor
Can I go back to square one for a moment?
Why do you want to move the execution of the browser from your code to an extension? The automation code for running browsers, even in a loop, is relatively simple. Help me understand what you're trying to achieve... there may be a better way.- vthomeschoolmom5 years agoSuper Contributor
To answer yuor question, basically the encapsulation of a number of operations that are done consistently at the start of every test in a manner that is super simple for the test creators.
As to the solution, using the command directly rather than in batch was the thing. A little snip:
var runCommand = ""; //iexplore firefox chrome edge switch (ProjectSuite.Variables.BrowserUnderTest) { case "edge": runCommand = "cmd.exe /C start microsoft-edge:http://www.microsoft.com"; break; case "chrome": runCommand = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" break; default: runCommand = "cmd.exe /C start microsoft-edge:http://www.microsoft.com"; } WshShell.Run(runCommand);
Related Content
- 8 years agoSundaytwins
Recent Discussions
- 14 hours agojstaehlin
- 2 days agoAivanitskiy