Forum Discussion

b_fellows's avatar
b_fellows
Occasional Contributor
11 years ago

Issue launching Acrobat XI in TestComplete


Greetings,


 


I'm having an issue trying to launch Adobe Acrobat Reader XI from TestComplete, either from the TestedApps or from a script. So far I've been unable to work out why it's not working properly and wonder if anyone could help me.


 


When I attempt to launch Acrobat from TestComplete, nothing happens. The processes appear in Windows task manager and TC's object browser; but nothing appears on screen.


 


The only differences I can see between attempting to launch it from TC and launching it successfully from shortcut/start are how the processes are displayed. From TC, both processes are listed under 'Background processes' (first image) whereas normally they're split under 'Apps' and 'Background processes' (second image).









 


The problem seems to also be intermittent depending on machine used (all same setup). Acrobat 9 and 10 both worked successfully. Any ideas? I've also attached the ReportGenerator log.


 


Using TestComplete 10.10 on Windows 8.1.


 

9 Replies

  • b_fellows's avatar
    b_fellows
    Occasional Contributor
    Thanks for your help Ryan.



    I'm unable to access my local administrator account at this time, but my domain account is an administrator on this machine and both Acrobat processes run under this account.



    Some good news though, my colleague has managed to get it to work by playing around with some of the settings in Acrobat under Edit | Preferences.



    On 3D & Multimedia | 3D Tool Options, changing both 'Open Model Tree on 3D Activation' and 'Default Toolbar State' from 'Use annotation's settings' to 'Yes' and 'Shown' respectively,



    And under Security (Enhanced) | Sandbox Protection, unticking 'Enable Protected Mode at startup'.



    This somehow seemed to do the job and I can now run Acrobat XI from TC. I can't confirm whether some or all of the above settings were the cause, as putting them back to how they were doesn't recreate the error - Acrobat will still run successfully.



    It's also worth noting I was playing around with the MSAA option under the Project Properties | Open Applications | MSAA '*' option, which may have affected it; but again, everything was reset back to default with it still working fine!

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    "attempting to launch it from TC"

    Can you give a specific example or snippet of how you are doing this?
  • b_fellows's avatar
    b_fellows
    Occasional Contributor
    Of course, either:



    • Right-clicking on it in TestedApps and clicking 'Run selected'


    • Using the line 'TestedApps.AcroRd32.Run()' from inside a script


    Thanks,



    Ben
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor


    • Right-clicking on it in TestedApps and clicking 'Run selected'



    Using that method it seems to work for me. I would try readding the AcroRd32 to your testedapps collection. Check your application path under the "Run-mode parameters" make sure you don't have any command line parameters or working folder and that it says something like: C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe

    In the Application path. Also make sure the "Run Mode" is set to simple.

  • b_fellows's avatar
    b_fellows
    Occasional Contributor
    I've reinstalled Acrobat, readded it in TestedApps and restarted my machine.



    The application path is definitely correct and there are no parameters, working folder or anything and run mode is set to simple (see attached image).



    However, still an issue. On top of this, Acrobat seems very unstable when being accessed by TestComplete, either from the script or from the spy tool, and it often terminates unexpectedly. I've switched off the accessbility option that attempts to auto-tag the PDF; which was causing some issue, but no effect.



    I'm just going to try it again on another machine with TC version 10 incase it's something to do with the latest update.
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    That is interesting. It sounds almost like it's not running with your current Windows user and is instead starting under a different user thus not showing the main form. That is of course based on the fact that you can launch reader outside of test complete. So one thing you can try doing is logging in as the local administrator on your machine and try it. If that works then you'll know it's probably the way you launched test complete, domain rights, etc.
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    Sounds like you took all the right troubleshooting steps to narrow it down and figure it out. I know how frustating problems like this can be so I'm glad you got it!
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Ben,



    One more idea is to start TestComplete as administrator (right-click and select Run as administrator). Does this improve the situation?
  • b_fellows's avatar
    b_fellows
    Occasional Contributor
    Hi Alexei



    I've been running TestComplete as an administrator as you suggested, but so far there doesn't seem to be any difference with Acrobat accessibility.



    However I’m unable to recreate the original issue at the moment, but I'll persist for now and let you know if I find anything.



    Many thanks,



    Ben