码迷,mamicode.com
首页 > 其他好文 > 详细

获取DATA的数据

时间:2016-11-21 08:06:30      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:sheet   val   wine   oci   ticket   data   order   button   get   

num=DataTable("参数名",dtGlobalSheet)

 

‘systemutil.Run "C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe" 多次循环时,使用systemutil.Run可以在每次循环时自动打开软件或url
systemutil.Run Environment.value("dizhi")‘使用环境变量
‘msgbox Environment.value("dizhi")‘窗口输出
Dialog("Login").WinEdit("Agent Name:").Set DataTable("name", dtGlobalSheet)
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure DataTable("password", dtGlobalSheet)
Dialog("Login").WinButton("OK").Click
‘Window("Flight Reservation").WinObject("Date of Flight:").Type "110816"
‘Window("Flight Reservation").WinComboBox("Fly From:").Select "Los Angeles"
‘Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinObject("Date of Flight:").Type DataTable("date", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("fromcity", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("tocity", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
‘Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select RandomNumber("piao")

num=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount‘获取列数
‘Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select RandomNumber(0,num)‘方法一选择随机航班
rannum=RandomNumber(0,num)
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select rannum‘方法二
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "lee"
Window("Flight Reservation").WinEdit("Tickets:").SetSelection 0,1
Window("Flight Reservation").WinEdit("Tickets:").Set "2"
Window("Flight Reservation").WinRadioButton("Business").Set
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"

获取DATA的数据

标签:sheet   val   wine   oci   ticket   data   order   button   get   

原文地址:http://www.cnblogs.com/yunman/p/6084110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!