UFT对象库编程法、直接描述性编程法以及with语句的使用

'一、UFT直接录制方法(利用对象识别):
Dialog("Login").WinEdit("Agent Name:").Set "wml111"
Dialog("Login").WinEdit("Password:").SetSecure "5514daebeeea118b8a208fcb96ce79880347a908"
Dialog("Login").WinButton("OK").Click


'二、直接描述性编程方法:
Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "wml111"
Dialog("text:=Login").WinEdit("attached text:=Password:").SetSecure "5514daebeeea118b8a208fcb96ce79880347a908"
Dialog("text:=Login").WinButton("text:=OK").Click

'with语句表示方法:
With Dialog("Login")
	.WinEdit("Agent Name:").Set "wml111"
	.WinEdit("Password:").SetSecure "5514daebeeea118b8a208fcb96ce79880347a908"
	.WinButton("OK").Click
End With


你可能感兴趣的:(UFT对象库编程法、直接描述性编程法以及with语句的使用)