Previous Topic: Mobile AssertionsNext Topic: Ensure Screen Element Matches Expression


Ensure Same Mobile Screen

The Mobile Ensure Same Mobile Screen assertion verifies that all screen elements on the mobile device match the original recording. By default, if any element on the screen is different, the test step fails.

Complete the following fields:

Name

The name of the assertion. The default value is Assert same screen.

If

Select one of the following values.

Then

Select the action to take when the conditions of the selected If statement are met:

Log

The text that appears as log event text when the assertion runs.

Click Run Assertion to execute the assertion.

Difference Threshold

The difference threshold lets you define the level of precision to use when comparing screens. Subtle differences can exist between the application and the recorded screen shots, even when the application has not changed. For example, your test could compare a table in your application to a screenshot of that same table. If the screenshot included a highlighted row, but no rows were highlighted in the application, a precise pixel-by-pixel comparison shows these tables as nonmatching.

The default difference threshold is 1000, but you can adjust this number if you find that your test case is returning incorrect matches. The following values provide some guidance for your settings:

Start of Step

Selecting this check box indicates that the screen comparison occurs at the beginning of the step.

End of Step

Selecting this check box indicates that the screen comparison occurs at the end of the step.

Consider image pixels

Selecting this check box indicates that pixel comparisons are used to determine the screen matches.

Consider screen structure

Selecting this check box indicates that the structure of the screen is used instead of a pixel comparison to determine screen matches. For example, you might have a screen that displays the current date and time. The date and time in a recording that was performed two days ago do not match a test that you run today. This option lets you ensure that the same screen structure is in place, even though the specific values on the screen do not match.

Consider component bounds