Thursday 11 September 2014

Launching application using Script PART-1

Launching application using Script:
There are 2 types of functions to launch application during runtime

  1. Invokeapplication:
  2. SystemUtil.Run:
  1. Invokeapplication:
Using this function we can open applications during runtime (only .exe file)
Where as it supports only .exe files
Syntax: to open windows based applications
Invokeapplication “path of application”

Ex: write script to open “Calculator” application

Syntax: to open web based applications
Invokeapplication “ browser_path Application_URL”

Ex: write Script to open Google.co.in web site
Script:
invokeapplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE www.google.co.in"

  1. SystemUtil.Run:

     Using this utility function we can open application and any system file during runtime

     This function will return status into test result window

     Syntax: to open any system file/windows based application
     SystemUtil.Run “Path of file/application”

    Syntax: to open web based application
    SystemUtil.Run “browser_path”, “application_URL”
    
    Script:

    systemutil.Run "iexplore.exe",www.google.co.in



0 comments:

Post a Comment