10-21-2011, 12:55 PM
Hi,
I am creating an application using vb.net which will launch and start recording qtp.
code snippet is below
It is launching qtp, but sendkey is not working. What am i doing wrong here?
I am creating an application using vb.net which will launch and start recording qtp.
code snippet is below
Code:
qtpApp = CreateObject("QuickTest.Application")
qtpApp.Launch()
qtpApp.Visible = False
'qtpApp.WindowState = "Minimized"
qtpApp.ActivateView("ExpertView")
qtpApp.Visible = False
' qtpApp.New()
WScript.Sleep(1000)
qtpApp.ActivateView("ExpertView")
'qtApp.Visible = True
WshShell = CreateObject("Wscript.Shell")
WScript.Sleep(10000)
qtpApp.Visible = True
qtpApp.WindowState = "Maximized"
WScript.Sleep(500)
WshShell.SendKeys("{F3}")
WScript.Sleep(100)
WshShell.SendKeys("{enter}")
qtpApp.WindowState = "Minimized"
qtpApp.Visible = False
WScript.Sleep(800)
_blQTPLaunched = True
It is launching qtp, but sendkey is not working. What am i doing wrong here?