|
最近遇到了一个问题, 很糊涂,不知道是什么原因引起的,各位帮忙看一下:
set lTaskTree = Browser("Browser").FlexApplication("****").FlexTitleWindow("roject Detail").FlexAccordion("projectAccordion").FlexCanvas("roject Task").FlexTree("leftTaskTree")
我操作这个对象:
lTaskTree.Open "Task_Category_002qw"
执行,没有问题。
让然后我把oen这个方法放到一个函数中,
Function UD_Flex_SelectInTree ( obj, parentValue, childValue, ojbName )
if IsNull( childValue ) then
BF_INT_Select obj, parentValue, ojbName
On Error Resume Next
obj.Open parentValue
On Error GoTo 0
Err.Clear
else
BF_INT_Select obj, parentValue, ojbName
On Error Resume Next
obj.Open parentValue
On Error GoTo 0
Err.Clear
BF_INT_Select obj, parentValue&">"&childValue, ojbName
end if
End Function
我调用这个函数:
UD_Flex_SelectInTree lTaskTree, "Task_Category_002qw", NULL, "Task"
结果:出现这样的错误:
Unable to find automation method 'open' for class 'name: FlexTree superClassName: FlexList event2descriptor: (Object)#0 flash.events.FocusEvent|keyFocusChange = (mx.automation.qtp:TPEventDescriptor)#1 eventClassName
即使我这样:
UD_Flex_SelectInTree Browser("Browser").FlexApplication("****").FlexTitleWindow("roject Detail").FlexAccordion("projectAccordion").FlexCanvas("roject Task").FlexTree("leftTaskTree"), "Task_Category_002qw", NULL, "Task"
也不行。 请教各位高手, 这是为什么呢。怎么解决呢!
谢谢!
[ 本帖最后由 getfly 于 2008-5-6 14:51 编辑 ] |
|