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. HCL OneTest™ UI needs
these container controls to run certain methods to retrieve information about
their children.
Before you begin
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:
Java | .Net |
---|---|
boolean shouldBeMapped() | bool ShouldBeMapped() |
Example
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;
}
}