We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

sandeep7972's avatar
sandeep7972
Occasional Contributor
5 years ago
Solved

How To open a testedapp file(Test Document) from a path

Hi. My TestedApp is Windows word and i need to open a test document which is a word file. How can i open it by using the path of the file in a script.
  • anupamchampati's avatar
    5 years ago

    Option 1. Automate the step to click on New and File

    Option 2. Use Command Line para available for Window Word  : winword.exe <filepath>  you can set it from the code
    as shown below
    TestedApps.notepad.Params.ActiveParams.CommandLineParameters = "\"" + "C:\\My File.txt" + "\"";
    TestedApps.notepad.Run();

    Link: https://support.smartbear.com/testcomplete/docs/testing-with/tested-apps/desktop/command-line.html

    Please consider giving a Kudo if I write good stuff