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. Rational® Functional Tester needs these container controls to run certain methods to retrieve information about their children.
Before you begin
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 Extensible methods for mapping TestObjects:
Java | .Net |
---|---|
boolean shouldBeMapped() | bool ShouldBeMapped() |
Example
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;
}
}