1.

What are the various methods for launching an application in UFT?

Answer»

Following are the different methods of launching an application:

  • SystemUtil.Run:

Following is the SYNTAX for USING SystemUtil.Run

SystemUtil.Run ( FileName, Parameters, Path, Operation )

Example: 

SystemUtil.Run("chrome.exe",http://www.google.com)SystemUtil.Run("test.txt", "","C:\","1")
  • InvokeApplication:

We can also use the InvokeApplication COMMAND for launching an application.

InvokeApplication "C:\Program Files\Google Chrome\CHROME.EXE http://www.google.com"
  • Using VB SCRIPT to create a shell object:

Example: We create a “WScript.shell” object.

Dim testshellSet testshell= CreateObject ("Wscript.shell")testshell.run "%windir%\paint"


Discussion

No Comment Found