1

我无法使用 Rft 工具中的测试对象检查器在我的 flex 应用程序(swf 文件)中获取 flex 组件的 Id 属性。

我怎样才能得到它们?

4

2 回答 2

1

你不能。Flex mxml 组件 ID 仅用作包含父级中的哈希。它们仅用于引用对象并在编译时被丢弃。

于 2011-09-26T04:49:44.727 回答
0

If you have an id property for your flex component then there are a couple of ways to find out the id property of your desired control.

Make sure you have embeded your .swf file inside an html wrapper(as suggetsed by RFT) and displaying it in an enabled IE browser.

Hover over the component, say a button(and you should see automation name as well as id value).

Else you can do a simple script call to get the id of desired component:

System.out.println(desired_object().getProperty(".id"));
于 2013-10-09T07:53:20.723 回答