Changing the role of a control
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 HCL DevOps Test
UI (Test UI) predefined role
values.
Before you begin
Java | .Net |
---|---|
String getRole() |
string GetRole() |
The following Java™ sample changes the icon for the TestObject to a slider icon:
Example
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;
}
}