QTP 自动化测试桌面程序--笔记(关闭 启动程序)

1 关闭 启动程序: 将要操作的程序-存入localdatatable中 设置 迭代一次

rem SystemUtil.CloseProcessByName("SHAutoClient.exe")
rem SystemUtil.CloseProcessByName("SHMsgSrvr.exe")
rem SystemUtil.CloseProcessByName("SHAutoServer.exe")
rem SystemUtil.CloseProcessByName("SHSckt.exe")

SystemUtil.CloseProcessByName(DataTable("D", dtLocalSheet))
SystemUtil.CloseProcessByName(DataTable("C", dtLocalSheet))
SystemUtil.CloseProcessByName(DataTable("B", dtLocalSheet) )
SystemUtil.CloseProcessByName(DataTable("A", dtLocalSheet))

Dim path
path="E:\Program Files\SHRemoteSoft\驷惠WIN系列乘用车4S管理系统61\"

SystemUtil.Run ( path & DataTable("A", dtLocalSheet))
SystemUtil.Run ( path & DataTable("B", dtLocalSheet))
SystemUtil.Run ( path & DataTable("C", dtLocalSheet))
SystemUtil.Run ( path & DataTable("D", dtLocalSheet))
rem SystemUtil.Run(path&"SHSckt.exe")
rem SystemUtil.Run(path&"SHMsgSrvr.exe")
rem SystemUtil.Run(path&"SHAutoServer.exe")
rem SystemUtil.Run(path&"SHAutoClient.exe")

猜你喜欢

转载自www.cnblogs.com/caojuansh/p/9072417.html
QTP