Launching the applications in UFT

We can launch the application in UFT using 3 ways.
  • By using SystemUtil
  • By using InvokeApplication
  • By using object
SystemUtil object provides run method that can be used to launch the applications.
  • First argument is the path to application binary.
  • Second argument is passed as argument to application itself.
  • Third argument can be used to specify the path of the binary.
  • Fifth argument can be used to specify the application window state.
SystemUtil.Run “iexplore.exe”, “”
SystemUtil.Run “abc.txt”
SystemUtil.Run “iexplore.exe”, “”, “PathToIE”

open in maximize mode
SystemUtil.Run “notepad.exe”, “f1.txt”, “”, “”, 1

‘opens the window in minimized mode
SystemUtil.Run “notepad.exe”, “f2.txt”, “”, “”, 2

InvokeApplication – as the name indicates, it is used to launch the application It is as good as calling SystemUtil.Run
InvokeApplication “chrome.exe”

Set o = createobject(“”)
o.Run “chrome.exe”
o.Run “firefox.exe”
Set o = nothing  

Web development and Automation testing

solutions delivered!!