zoukankan      html  css  js  c++  java
  • 获取列表数据数量

    num=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount'获取列数

    'systemutil.Run "C:Program Files (x86)HPQuickTest Professionalsamplesflightappflight4a.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"

  • 相关阅读:
    LeetCode 81 Search in Rotated Sorted Array II(循环有序数组中的查找问题)
    LeetCode 80 Remove Duplicates from Sorted Array II(移除数组中出现两次以上的元素)
    LeetCode 79 Word Search(单词查找)
    LeetCode 78 Subsets (所有子集)
    LeetCode 77 Combinations(排列组合)
    LeetCode 50 Pow(x, n) (实现幂运算)
    LeetCode 49 Group Anagrams(字符串分组)
    LeetCode 48 Rotate Image(2D图像旋转问题)
    LeetCode 47 Permutations II(全排列)
    LeetCode 46 Permutations(全排列问题)
  • 原文地址:https://www.cnblogs.com/yunman/p/6084112.html
Copyright © 2011-2022 走看看