|
Dim qtApp 'as quicktest.application' declare the application object variable
Set qtApp = CreateObject("QuickTest.Application") 'create the application object
qtApp.SetActiveAddins Array("Web") 'Activate the web add-in
qtApp.Launch 'start QuickTest
qtApp.New 'open a new test
'configure the web application to use with this test
qtApp.Test.Settings.Launchers("Web").Active = True
qtApp.Test.Settings.Launchers("Web").Browser = "IE"
qtApp.Test.Settings.Launchers("Web").Address = "http://www.163.com"
qtApp.Test.Settings.Launchers("Web").CloseOnExit = True
'configure active screen access settings
qtApp.Test.Settings.Web.ActiveScreenAccess.UserName = "user1"
qtApp.Test.Setting.Web.ActiveScreenAccess.Password = "mypassword"
'configure other web settings
qtApp.Test.Settings.Web.BrowserNavigationTimeout = 60000
qtApp.Test.Settings.Web.NextPageIfObjNotFound = True
qtApp.Visible = True 'Make the quicktest application visible
Set qtApp = Nothing '
我运行这段qtApp.SetActiveAddins Array("Web")脚本时,出现
RUN ERROR
this operation can be performed only before the application starts
请大家帮忙解释下这是什么原因
另外问个自动化程序可以直接在QTP专家视图里面编写和运行吧?但是我看不到QTP的启动过程。
或者还有其他工具可以运行自动化脚本,并启动QTP呢。。
谢谢
[ 本帖最后由 waiverson 于 2007-11-13 13:56 编辑 ] |
|