In addition to XPaths, Expert Mode within the Capriza Designer offers several other advanced options for strengthening controls. This article will detail each of these options and their applicable use cases.
Included within the Expert Identification section, CSS Selectors enable you to strengthen controls by specifying specific CSS classes that are unique to that web element and consistent throughout the source application.
Let's take the blue search button in the below application as an example.
Throughout the source application, the button belongs to a particular CSS class, called ".btn," that describes the button color, border radius, etc. To help Capriza better identify the button, you can select the .btn class from the CSS Selectors menu.
Note: CSS Selectors are based on the styles of the source application—not the Zapp. Therefore, even if you apply different styling to the control using the Designer that render it less unique or vary throughout the Zapp, Capriza will still be able to leverage CSS Selectors to identify the control.
As with XPaths, changes to the CSS of the source application may impact the ability of Capriza to locate the control. Exercise caution when using CSS Selectors with applications that may change frequently.
Elements within the HTML DOM, particular interactive ones like buttons, modals, lookups, etc., may be listening for a variety of events. Events may include a variety of actions, such as Keyboard interaction, Mouse interaction, Value change, Focus change, Page change, etc.
For example, a text input may listen for a keydown event, and when the user begins typing, the web page can catch it and do something with it, such as surfacing a popup message.
These event listeners can also be used to strengthen controls. To add event listeners, simply enable Expert Mode within the Identify tab and choose the desired listener from the dropdown menu.
Visibility of a control on the corresponding web page is typically one of the first checks Capriza performs to decide whether to display a control and its corresponding mobile page. However, there may be situations where you would like to display a control within your Zapp regardless of whether or not it is visible in the source application page.
For example, you may have a search field that only renders in your web application once a button is clicked. If the field is always present in the DOM, skipping the visibility check can remove the need to click on the button.
In such cases, the Visibility setting within Expert Mode can be used. If set to "No," Capriza will look for and, if correct facts and anchors are present, render the mobile control even if it is not visible in the web application.
For source applications that change infrequently, you can also use consistency in DOM distance (number of elements between the element and the bottom of the DOM tree) to strengthen controls. The Designer will automatically assume the answer (Yes/No) to this question. You may modify or confirm the answer to better strengthen your control.
For controls with at least one unique component to them, the Summary Question provides an easy way of highly strengthening the control. The Summary Question lists the key attribute used to identify that controls and asks you to confirm if it is the only control on the page that matches the set of attributes.
Note: The Summary Question is only surfaced if the Designer detects an attribute that may possibly be unique only to that control.
If set to yes, this indicates to Capriza that this attribute is unique to this control and, if present, the control can be recognized with 100% certainty. The strength meter will go up to 10.
Answering the question yes will override all other Anchors and Facts. Only answer "Yes" if you are certain.