|
3#
楼主 |
发表于 2007-8-18 00:44:18
|
只看该作者
对不起,我的问题没清楚。我的想法是参数化 browser, 参数化网页地址
IE这段运行可以。但是QTP总是打不开FireFox.
Function SetupBrowser(Browser)
Dim MyBrowser
StartURL = "http://localhost/ekp/servlet/ekp/login?getnews=Y"
‘ I want to parameter this first URL later on.
IF Browser ="IE" Then
Set MyBrowser = CreateObject("InternetExplorer.Application")
MyBrowser.Visible = True
While MyBrowser.busy
Wend
' webutil.DeleteCookies
MyBrowser.Navigate StartURL
End If
If Browser ="FireFox" Then
Set MyBrowser = CreateObject("QuickTest.Application")
MyBrowser.Test.Settings.Launchers("Web").Active = True
MyBrowser.Test.Settings.Launchers("Web").Browser = "FF20"
MyBrowser.Test.Settings.Launchers("Web").Address = StartURL
'MyBrowser.Test.Settings.Launchers("Web").CloseOnExit = True
End If
End Function
SetupBrowser(IE);
RunAction("XXX1", oneIteration)
RunAction("XXX2", oneIteration)
….
SetupBrowser(FireFox);
RunAction("XXX1", oneIteration)
RunAction("XXX2", oneIteration)
就是动态确定test script运行在哪个browser上. Anyone can help me? Thankssdlkfj6
[ 本帖最后由 vaguely 于 2007-8-18 00:57 编辑 ] |
|