求助:无法识别测试对象
用Function Tester测试java的应用,该应用的界面控件是用java的SWT,当使用验证点时,Tester无法识别控件,请问用什么方法才能使Tester能够识别,谢谢 请问:你有没有enable被测的swt application?再试试:
To enable an SWT application for testing, the following code should be called from the UI thread of the application. Typically this is the code that first creates the application Shell. We currently do NOT support testing multiple Displays within a single application. Should someone have a need for testing multiple Displays please ask for such support from the product management team.
Here is the code:
try
{
// Self-enable this application. The object passed to
// enableSwtUi must be an object or class whose classLoader
// has access to the SWT classes.
// enableSwtUi() must be called from the SWT UI Thread.
// If the JRE in which the application is running is enabled
// by IBM Rational Functional Tester it will then be testable.
// If the JRE is not enabled, a ClassNotFoundException will
// be caught here and the application will load as usual but
// it will not be testable.
com.rational.test.ft.bootstrap.Bootstrap.enableSwtUi(this);
}
catch (Throwable e) {} 多谢,我在网上找了这篇文章,解决了我的问题,供大家参考http://www.ibm.com/developerworks/cn/rational/r-cn-rftaopswt/#list2
页:
[1]