Forum Discussion
That code looks a bit neater than ours. I will try it that way as well.
I stopped using waitBrowser because waitBrowser does not recognize iexplore processes running without an actual page interface. Too many times, this code:
browser = waitBrowser(browserName, 1000); if (!browser.Exists) { Log.Message ('Browser does not exist, I am going to start it...'); Browsers.Item(browserName).Run(url) }
lead to log:
Browser exists, I am going to start it
Browser already running!
said 'there is no browser running, I am going to start one...'
and then 'Browser already running' when doing
Actually, in our case, WaitBrowser finds the IE processes just fine. Give it a shot and see if it works for you.
Something else to consider doing is making sure all browsers are closed at the start of a tst case as well before running the browser... close everything, then run.
- marinb7 years agoContributor
Yeah, the startBrowser(x) function first closes all browsers of type x, unless you specify you do not want to. Nothing more annoying than connecting to a test agent and finding 34 browsers opened.