When automating Web or Mobile UI tests, View forms an integral part of a Context. It represents the visual state of a page or screen and captures the essence of the application interaction available in the screen. A given Context may have zero or more Views depending on the page's layout and functionality.
ACCELQ supports Views for Web and Mobile applications.
What is a View used for?
When you capture a View in a Context, you are bringing your application's visual information (in the form of elements) into ACCELQ.
Using a View, you can set up element identification, which is a core aspect of automated interaction during a test flow. You can also use Views to build logic in Actions.
Views also provide rich support for self-healing at runtime, in case element description has changed over time. All these use cases will be dealt with in detail in subsequent topics.
Views also provide offline access to your application to continue building test logic, even if your application is not available all the time. This is especially helpful when you are building automation tests for a new feature under development.
Creating a View
ACCELQ supports recording Views for Web and Mobile applications. Here are the articles explaining the recording process for these two application types.
With Release 6.0, Views for Web applications are automatically created as part of your logic development from the Recorder browser. You may not need to manually create Views for Web applications unless there are any special requirements.
Views for Mobile applications are still to be captured manually.
To record a View, you need ACCELQ's View Recorder plugin, which is available on the Chrome store. Here is an article for installation instructions.
Views are visible in Contexts and Actions
A View is captured for a given Context, and hence the Context owns it. You can access the Views by navigating to the Context.
In addition, the same set of Views is also accessible from all the Actions that belong (owned) to this Context. Actions rely heavily on the Views to develop logic and identify elements. All the Actions belonging to one Context share the Views. Click on the Views tab when you open an Action.
Keeping this symmetry in mind, you can also initiate recording a new View from the Views tab of an Action. But the View ultimately gets saved as part of the Owner Context and available to all the Actions that belong to this Context.
Views recorded for a given Context are accessible from the Context as well as all the Actions that belong to the same Context.