Forum Discussion

tomas_panik's avatar
tomas_panik
Occasional Contributor
14 years ago

Firefox under RunAs mode

Hi, I have a problem. I want to run Firefox application under non administrator account, so I run it like: TestedApps["firefox"]["RunAs"]("mydomain", "user", "password"). But then TestComplete doesn't have access to page content (Sys["Process"]("firefox")["Page"]("*") doesn't even appear in Object Browser). In case of InternetExplorer the same thing works perfectly. Do I do something wrong or is it incorrect behavior?


Thanks for answer


--

Tomáš Pánik

Quality Assurance Specialist

Customer Services

AVG Technologies CZ, s.r.o.

email: tomas.panik@avg.com

9 Replies

  • Hi Tomas,



    We cannot reproduce this issue on our side.



    What version of FireFox are you using? TC 7.52 supports Firefox ver. 1.5.0.1 - 3.5.



    Also, make sure that you run TC under as administrator. Here is a quote from the "TestedApp.RunAs" help topic:

    In order for TestComplete to be able to test the application that is launched with the RunAs method, it is recommended that TestComplete is running under the administrator account. If TestComplete is running under a user account, it may not have enough permissions to retrieve information about the tested application’s windows and objects.

  • tomas_panik's avatar
    tomas_panik
    Occasional Contributor

    Hi, 

    Thanks for reply. 



    I am using Firefox 3.5.7, TestComplete version: 7.52.678.7. I run TestComplete normally under Administrator account and then I am just executing commands from TestComplete script workspace. I added 2 screenshots of object browser as an attachment. in firefox_run.png is firefox ran under administrator account with following command: TestedApps["firefox"]["Run"](). In firefox_runas.png is firefox ran under "tester" (user) account with following command: TestedApps["firefox"]["RunAs"]("domain", "tester", "password"). As you can see in run under administrator there is normal access to page content, but in run under tester account ["Page"] and ["UIPage"] are missing. In addition there is another process "TCRunAs" under "tester" account as well. 


    --

    Tomáš Pánik

    Quality Assurance Specialist

    Customer Services

    AVG Technologies CZ, s.r.o.

    email: tomas.panik@avg.com

  • tomas_panik's avatar
    tomas_panik
    Occasional Contributor

    Any solution?


    --


    Tomáš Pánik

    Quality Assurance Specialist

    Customer Services

    AVG Technologies CZ, s.r.o.

    email: tomas.panik@avg.com
  • tomas_panik's avatar
    tomas_panik
    Occasional Contributor

    Hi Allen,

    I have set the settings according to the help (I gave access permission to user "Administrator" (under this account I am logged in and TC runs under it) as well as user "tester" (under this account I want to run Firefox, its not domain account, just account on local machine)), but no help. The problem still remains. I don't think that this caused the problem, because when I previously ran Internet Explorer under "tester" account without those modifications, the page content was visible normally (["Page"](*)). I think its easy to reproduce the problem, just create user account with limited rights and try TestedApps.Firefox.RunAs under this account (I am trying it on XP). It happened on 2 computers I have tried it on. 


    --

    Tomáš Pánik

    Quality Assurance Specialist

    Customer Services

    AVG Technologies CZ, s.r.o.

    email: tomas.panik@avg.com


  • Hi Tomas,





    We have faced a similar problem recently, and it was caused by the fact that the customer processed Firefox with VMware ThinApp. In this case, the actual tested Firefox process was a child of the process that was launched by the Tested Applications feature. Currently, TestComplete can work without problems only with the process that is launched by the Tested Applications feature in RunAs mode, not with the child processes of this main process.





    Please let me know if this situation is yours.
  • tomas_panik's avatar
    tomas_panik
    Occasional Contributor

    Hi, no its not the case..I think its some problem with permission. When I start firefox in RunAs mode tcHook.dll is not injected to firefox process (according to processExplorer), so I had to grant some special permission for firefox to the "user", and tcHook was there, but it didn't work anyway. However I noticed that on Vista the same thing works. So I meet the problem only on WinXP. I think I will be forced to solve the problem via saving HTML file and parse it manually...Nevertheless if you find any sufficient solution give me know, thanks


    --

    Tomáš Pánik

    Quality Assurance Specialist

    Customer Services

    AVG Technologies CZ, s.r.o.

    email: tomas.panik@avg.com


  • Hi Tomas,





    Try to find out whether Firefox is launched in a special way on this machine. TestComplete can work correctly only with a process that is launched by the tool. If this process launches another instance of itself and the original instance is terminated, TestComplete will be unable to work correctly with the new instance.





    The Run method of the TestedApp object returns a process object. Try working with this object instead of getting the process object anew and let me know how this works for you.