This article gives a high level overview of the concept of Context. Further details are discussed in an expanded format in subsequent sections.
What is a Context?
A context is like a page on your web application. Every distinct page on the test application becomes a Context in accelQ.
Picture shows Account Summary Page of our QBank application.
Note: It is common to name a Context with "Page" suffix.
What is a Context made of?
Context contains Views and UI elements and supports Actions. Context will contain one or more Views.
- Context manages the UI elements belonging to a page.
- You can define multiple Actions in a context.
Entry Point Context: Login Page
Picture represents the login page of QBank.
This is an entry-point context, which means this page can be loaded in your browser with a static URL.
Synch Point for a Context
Synch point is used to wait for the page to fully load during test execution.
Before a step is performed in a page, test run will wait for the corresponding Synch point to fulfil.
What is a View?
View is an image capture of your context (or page). View contains UI elements that are used in your test logic.
- View is captured using accelQ plugin.
- There can be more than one View for a context.
Example 1: Login page view
This is the view captured for Login Page context in QBank application.
You can hover around on the screen to interact with various elements.
Example 2: Multiple Views
Notice two views for the same page (context). Flights view and Hotels view.
We take a new view in case our test logic requires interaction with elements that are not available in existing views.