不谋万世者,不足谋一时;不谋全局者,不足谋一域。君子敏于事而慎于言 新浪微薄:土司阿哈

使用QTP环境变量

上一篇 / 下一篇  2008-11-14 15:28:09 / 个人分类:qtp

1208328177
  • 自动化测试:
  • 测试文档:
51Testing软件测试网R3l'e3@;FS

Dim Excel,Workbook,WorkSheet,run_value,scrīpt_name51Testing软件测试网PD*I x$aN1A
Dim filepath,bnpFileName
c.qI8m.|$pA4P5dg N051Testing软件测试网l^-W:i9Pi$q,D
Environment.Value("file_pash") = "C:\Documents and Settings\robel.yi\Desktop\BNP_scrīptS"51Testing软件测试网7\p4y kh#B8jvg

b B%r`/Y2t&?$}0filepath=environment("file_pash")51Testing软件测试网 gU?tE
bnpFileName=filepath & "\Data_file\Main_DATA.xml"
!_/plMu051Testing软件测试网xE8V `u};v9u9q&P
Set Excel= CreateObject("Excel.Application")51Testing软件测试网6]ve QA
Set Workbook= Excel.Workbooks.Open(bnpFileName)
2S ?,|*a&x+S3uX;y0Set WorkSheet= workbook.Worksheets("Sheet1")
;f6c-P4y\"n/Wp4G051Testing软件测试网SF!L7D8f.c&Z ^R1J
For i = 2 To 651Testing软件测试网:D d ku2]x-h
        run_value=CStr(WorkSheet.Cells(i, 3))51Testing软件测试网:Bjy B GL;pH|,C
        If run_value = "Y" Then
U%H;ss8j$x:b0                RunAction CStr(WorkSheet.Cells(i, 2))
S;CMcS0        End If51Testing软件测试网 CZ-J&Bz TD%@$~-l
Next51Testing软件测试网7f"u6P:Bz]bn` Q
51Testing软件测试网+@ Eb t2Dl,W;j
Excel.Quit51Testing软件测试网*U-iA,~*T uJ
Set Workbook = nothing51Testing软件测试网5V&R4\}F]
Set WorkSheet = nothing

CZ:o0Xk mA#kz051Testing软件测试网q8Y3{p3S5}6kw&N(pN

转载51testing http://bbs.51testing.com/viewthread.php?tid=131075

'V0^]Cj L1t7t0

TAG: QTP qtp

 

评分:0

我来说两句

Open Toolbar