Changing the mappability of a control

There are certain types of controls in applications under test (AUT) that do not need to be exposed as a TestObject. For example, container controls have no useful testing value and are not exposed. IBM® DevOps Test UI (Test UI) needs these container controls to run certain methods to retrieve information about their children.

You can specify whether to expose a control as a TestObject by extending the ShouldBeMapped() method. By default, only GUI TestObjects are mapped.

For example, the Panel control is not mapped. If you want to map this control, however, extend the ShouldBeMapped() method and specify the return value as true.

You can extend the methods listed in Table 1:

Table 1. Extensible methods for mapping TestObjects
Java .Net
boolean shouldBeMapped() bool ShouldBeMapped()
The following Java™ sample uses the ShouldBeMapped() method to change the mappability of a control:
import com.rational.test.ft.domain.*;

public class someProxy extends baseProxy
{
 .
 .
 public boolean shouldBeMapped()
 {
    return true;
 }
}

The following .Net sample uses the ShouldBeMapped() method to change the mappability of a control:

using Rational.Test.Ft.Domain;

public class SomeProxy:BaseProxy
{
  .
  .
  public override bool ShouldBeMapped()
  {
     return true;
  }
}
After successfully developing and deploying this proxy code, the control for which the proxy is written for will be mapped.