关于描述性编程..
Window下的Dialog的名称的一部分是动态生成的 如何用使用描述性的编程?wait 10Jilu= Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Check CheckPoint("Order No.")
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Type Jilu
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Check CheckPoint("Order No._2")
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Check CheckPoint("Customer Name")
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Window("Flight Reservation").WinObject("Date of Flight:").Check CheckPoint("Date of Flight:")
Window("Flight Reservation").WinMenu("Menu").Select "File;Fax Order..."
ff="Fax Order No.*"
Window("Flight Reservation").Dialog("text:="&ff).Activate
Window("Flight Reservation").Dialog("text:="&ff).WinObject("attached text:=Fax Number:").Set "3334445555"
Window("Flight Reservation").Dialog("text:="&ff).WinButton("text:=Send").Click
Window("Flight Reservation").WinObject("Fax Sent Successfully").Check CheckPoint("Fax Sent Successfully")
Window("Flight Reservation").Close在线等..谢谢 不了解具体情况也不太明白,从字面意思上讲要么使用正则表达式,要么就利用其它的属性来定位找到这个对象 回复 1# leonyaya
看着太乱了,代码就不看了。
对于动态生成的,要么用GetROProperty进行抓取。要么用正则表达式操作。
页:
[1]