Skip to main content

Verification of Elements

Problem Statement

User has to write a lot more code to verify the expected with actual result and it requires good amount of effort and time to be invested in it.

Solution by this Framework

Inline Assertions are provided by this framework.

Following is an example on how to do it.

. . .
final DashboardActivity main = new DashboardActivity (this.device);
main.onElement ("TypedAmt")
.verifyThat ()
.textShouldBeEqualTo ("$0.1");
. . .

Following is the list of verification methods available:

NameDescription
shouldBeDisabledVerifies if the element is disabled or not.
shouldBeDisplayedVerifies if the element is displayed or not.
shouldBeEnabledVerifies if the element is enabled or not.
shouldNotBeDisplayedVerifies if the element is hidden or not.
textShouldBeEqualToVerifies if element text is equal to given string or not.