51Testing软件测试论坛

标题: 请问一个treeview.select的问题 [打印本页]

作者: jackydao    时间: 2007-7-2 11:46
标题: 请问一个treeview.select的问题
根据帮助里说的,wintreeview.select可以根据value或者index来选择,
如:wintreeview.select"xxx" 和wintreeview.select x是可以相同的,但是如果是wintreeview.select"xxx;xxx;xxx"也就是说选择的是子节点,那么如果用index的应该如何呢?
谢谢
作者: walker1020    时间: 2007-7-2 13:00
怎么不去看 QTP的帮助呢?
作者: walker1020    时间: 2007-7-2 13:02
Description
Selects a node in the tree-view control.

Syntax
object.Select Item, [BUTTON], [Offset]

object    A test object of type WinTreeView.
Item       Required. A Variant value.

   The full path of the node to select in the tree-view control. The path is composed of the names of the nodes (with quotes) or numeric index (without quotes) separated by a semicolon. When specifying the index, the first node in a tree-view control is numbered 0.

  Note 1: If the node is identified by its full path, the default path delimiter is ';'. For example, "Root;Child1;Child2". If the default path delimiter character is used in a node name, you can change the delimiter character for your test or component using the "TreePathDelimeter" setting value. For example, Setting.Item("TreePathDelimiter") = "#"
Note 2: If the node is identified by its numeric index, QuickTest counts only the expanded nodes. Child nodes of a collapsed parent node are not counted. The first root node in a tree-view control is numbered 0.
作者: walker1020    时间: 2007-7-2 13:03
标题: Right-click a Node in a Tree View Control
Sub Select_Example()

'The following example uses the Select method to select the node with
'the right mouse button, with an offset of 20 pixels:

Dialog("Search").WinTreeView("SysTreeView32").Select "Green", 1, 20

End Sub
作者: jackydao    时间: 2007-7-2 14:53
真是太感谢了,我查了帮助的,就是没有上面提到的关键的Note的内容,难道因为我的帮助是8.2的?sdlkfj3




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2