The role of a control determines which icon is displayed in the
Object Map for a TestObject. You can do this by extending the getRole() method
and returning one of the Functional Tester predefined
role values.
You can extend the methods listed in
Table 1:
Table 1. Extensible methods for changing roles Java |
.Net |
String getRole() |
string GetRole() |
The following Java™ sample changes the icon for the TestObject
to a slider icon:
import com.rational.test.ft.domain.*;
public class someProxy extends baseProxy
{
.
.
public String getRole()
{
return TestObjectRole.ROLE_SLIDER;
}
}
The following .Net sample changes the icon for the TestObject
to a slider icon:
using Rational.Test.Ft.Domain;
public class AnyProxy:BaseProxy
{
.
.
public override string GetRole()
{
return TestObjectRole.ROLE_SLIDER;
}
}
After successfully developing and deploying this proxy code, the
icon for the TestObject in the Object map changes to a slider icon.