Forum Discussion

epatton's avatar
epatton
Occasional Contributor
8 years ago

IE launched through RunAs - working on TestComplete dev, but not finding the browser in TestExecute

We needed to run Internet Explorer as a different user for our tests, so I added a tested app for iexplore.exe and use the RunAs command to open it as the test user. After that, I grab the browser, page, etc. and perform my tests.

 

The problem is, this works just fine on my dev box where I have TestComplete installed. When I try to run the exact same tests on a remote server that has TestExecute installed, it can't find the browser object. This is the code I'm using to connect and to retrieve the browser object which works on my dev box, but not on the server (this is using a C# project with the AutomatedQA dll's):

 

TestedApps["iexplore"]()["RunAs"](domain, username, password, "", url);
var browser = Sys["Browser"]("iexplore");

The browser opens up and runs as the test user just fine on both computers, but when I try to get the browser object, it works on my computer but not on the remote computer. On the remote box, it will timeout trying to find the object (Waiting for Sys.Browser(iexplore)) and then close TestExecute. I have my timeout set for 60 seconds just to be sure it has enough time to find it, but it never does.

 

Is there some different way that you need to get the browser object when you use RunAs?