|
这个Tostring可不是C#里的Tostring
QTP里是把对象转化成字符形式
HELP里的描述:
Return Value
A String value. The name of the test object and its generic type, for example, MyButton VirtualButton.
Example:
Sub ReportRectangle(obj)
x = obj.GetTOProperty("x")
y = obj.GetTOProperty("y")
w = obj.GetTOProperty("width")
h = obj.GetTOProperty("height")
Reporter.ReportEvent micDone, obj.ToString() & " dimensions", "The Virtual object " & obj.ToString() & " is defined using the following dimensions:
" & x & ", " & y & ", " & x+w & ", " & y+h
End Sub |
|