Forum Discussion

abrooks4's avatar
abrooks4
Occasional Contributor
8 years ago
Solved

Right-click menu - Open with Adobe Reader

I'm attempting to open a PDF from the desktop using the right-click menu option. It runs successfully on the machine recorded, but fails on a different test machine. Any ideas why?

 

 

var folderView;

explorer = Aliases.explorer;

 explorer.wndShell_TrayWnd.TrayNotifyWnd.TrayShowDesktopButtonWClass.Click(2, 18);

folderView = Aliases.explorer.wndWorkerW2.SHELLDLL_DefView.FolderView;

folderView.SelectItem("Test_PDF")

folderView.ClickItemR("Test_PDF", 0);

folderView.PopupMenu.Click("Open with Adobe Acrobat Reader DC");

 

  • There error is basically the same as before... something is incorrect in the mapping of some of the components.  Why it's using progman versus wndWorker I'm not sure.  However, I don't think re-recording is the answer.  If you have a test that works on one machine and doesn't on another, then there are differences between the two environments that must be accounted for somewhere in your test using conditional logic (if/then/else).  Likewise, your name mapping may need to account for those differences in environments.

11 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What errors are you getting on failure? Is it the same OS? Is the same version of Adobe Reader installed? Is the same file present on the machine in question? 

     

    These are all things that could, potentially, break the recorded script.  That's where I'd start.

  • abrooks4's avatar
    abrooks4
    Occasional Contributor

    Versions of the OS and Adobe are the same. Upgraded to TC12.20.935.7

     

    Name mapping is now using wndProgram.SHELLDLL_DefView.FolderView

    I'm now getting a "list view item" not found error.
    I see the total number of items = 17

     

    I added the wSelectedItems property where it is set to the PDF File Name.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Let's approach this a different way... 

      ...is it a requirement of your test to open the file from the desktop using the right click?  Or do you need to simply open the PDF file and confirm some contents? The reason I ask is that I know that navigating some of the objects of the Windows operating systems can get a bit tricky to nail down... if you don't have to, I always try to avoid that.

      • abrooks4's avatar
        abrooks4
        Occasional Contributor

        Yes it is a requirement. We want to open by 1) launching the Adobe Acrobat application  2.) Launch App/File > Open from iManage and 3.) Right-click on PDF document on desktop to launch