Forum Discussion

pradeep_ediga's avatar
pradeep_ediga
Occasional Contributor
3 years ago

How to double click on a file with extensions from Folder

Hi All,

As part of my functional automation testing process, there is a step to double click on the downloaded software from certain folder. I was able to write a java script code to access the folder path and find the name of the downloaded software with extension but I couldn't be able to find any file operation related to opening a .extension file(double clicking) in Test Complete. Kindly help me on this.

Thanks,

Pradeep

  • See Running Tested Applications. Define your application in TestedApps editor, and then call the following code.

    function RunApp()
    {
        TestedApps.TeamExplorer.Run();
    }

    In this scenario, I have defined TeamExplorer application as "C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\devenv.exe" with a working folder of "C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\". Running the code, launching Microsoft Visual Studio Team Explorer 2019 from TC.

    • pradeep_ediga's avatar
      pradeep_ediga
      Occasional Contributor

      Thank you so much Marsha for your response. But this won't solve my problem here since I am trying to double click on executable file in some specific folder using automation code and the link given was to open a file from some windows applications like Notepad(File-->Open-->Choose file from folder). Kindly suggest if you have any idea about this.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See Running Tested Applications. Define your application in TestedApps editor, and then call the following code.

    function RunApp()
    {
        TestedApps.TeamExplorer.Run();
    }

    In this scenario, I have defined TeamExplorer application as "C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\devenv.exe" with a working folder of "C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\". Running the code, launching Microsoft Visual Studio Team Explorer 2019 from TC.

    • pradeep_ediga's avatar
      pradeep_ediga
      Occasional Contributor

      Hello rraghvani, Thank you so much for your response. It worked for me and appreciate your help.