Forum Discussion

googleid_109862's avatar
googleid_109862
New Contributor
13 years ago

What is the function for launch an application automatically while executing

Hi,



I am new to Test Complete.

I am trying to automate one of our .Net application and its working fine.



But now I want to launch that application while running.

below is the code working only if i open the application manually



Sub Test2

  Dim p, control

  ' Searches for the control

  Set p = Sys.Process("XYZ1.0").load()

  Set control = p.Find("Name", "WinFormsObject*TestSuiteFile_TxtBox*", 1000)



  ' Processes the search results

  If control.Exists Then

     call Log.Message(control.FullName)

  Else

     Log.Error "The object was not found."

  End If

End Sub



Above code is working only if i open the application (XYZ1.0) manually.

I want to open the application automatically while execution starts.



Please let me any method other "testedapp.run"





Regards,

Shankar L

  • Hi Shankar,


     


    You can use either the Exec or Run method of the WScript.Shell object. This question has already been discussed here.


    BTW, why don't you want to use the TestedApp object?