Thursday, 17 January 2013

Launching Internet Explorer Using QTP

Launching Internet Explorer Using QTP

Public Function launchIE()
   Dim oShell
Set Controller = CreateObject("WScript.Network")
        SysName=Controller.ComputerName
   UsrName=Controller.UserName
   If  Trim(SysName)=Environment("SYS_HOST") Then
  InvokeApplication "M:\Program Files\Internet Explorer\IEXPLORE.EXE"
    'SystemUtil.Run "M:\Program Files\Internet Explorer\IEXPLORE.EXE","","M:\Documents and Settings\"&UsrName ,"open"
   'SystemUtil.Run Environment("SYS_PATH") + "Internet Explorer\iexplore.exe","","","open"
      Else
   SystemUtil.Run "iexplore.exe","","","open"
   End If
End Function

No comments:

Post a Comment