Forum Discussion

epatton's avatar
epatton
Occasional Contributor
7 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?

1 Reply

  • YuriPeshekhonov's avatar
    YuriPeshekhonov
    SmartBear Alumni (Retired)

    Hi,

     

    You don't have to address objects another way. However, you must apply some settings to work in this mode. 

     

    First, please try disabling the LCIE feature of Internet Explorer for the account under which you run IE in Run As mode. To learn how to do this, please take a look at the "Disable Multiple Processes of Internet Explorer" section of the 'Preparing Internet Explorer for Web Testing' article. 

     

    Second, please refer to the "Settings for Testing Open Applications in RunAs Mode" article and make sure that all settings are made. 

     

    I hope this helps.