|
3#
楼主 |
发表于 2012-7-9 17:56:21
|
只看该作者
回复 2# 云层
书名:QTP自动化测试与框架模型设计
出版者:机械工业出版社
CHINA MACHINE PRESS
http://www.cmpbook.com
黄文高 编著
责任编辑:郝建伟
本光盘对应的图书号:ISBN 978-7-111-35003-3
光盘号见盘面
版权所有 侵权必究- Dim oShell, oEnvProc, oEnvSys, oItem
- Dim arrEnv
- Dim nRow : nRow = 1
- Set oShell = CreateObject("WScript.Shell")
- Set oEnvSys = oShell.Environment("System")
- Set oEnvProc = oShell.Environment("Process")
- Reporter.ReportEvent micDone, "Sys Count", oEnvSys.Count
- Reporter.ReportEvent micDone, "Proc Count", oEnvProc.Count
- For Each oItem In oEnvSys
- datatable.SetCurrentRow(nRow)
- nRow = nRow + 1
- arrEnv = Split(oItem, "=")
- DataTable("Type", dtGlobalSheet) = "System"
- DataTable("Variable", dtGlobalSheet) = arrEnv(0)
- DataTable("Value", dtGlobalSheet) = arrEnv(1)
- Erase arrEnv
- Next
- For Each oItem In oEnvProc
- datatable.SetCurrentRow(nRow)
- nRow = nRow + 1
- arrEnv = Split(oItem, "=")
- DataTable("Type", dtGlobalSheet) = "Process"
- DataTable("Variable", dtGlobalSheet) = arrEnv(0)
- DataTable("Value", dtGlobalSheet) = arrEnv(1)
- Erase arrEnv
- Next
- Set oShell = Nothing
- Set oEnvProc = Nothing : Set oEnvSys = Nothing
复制代码 |
|