You can customize the clickable elements that can be recorded during scenario recording. The scripts to modify are located in the following directories:
Internet Explorer: <INSTALL>/plugins/com.parasoft.xtest.libs.web_<version>/root/browsers/ie/UserCustomizableOptions.js
Chrome and Internet Explorer VariablesThe following array variables defined in the UserCustomizableOptions.js script are used during recording:
Clicking on HTML elements that are set with an attribute type defined in this variable will be recorded. For example,
onclick is used to initiate script execution and is a good candidate in this array.
Clicking on HTML tags defined in this variable will be recorded. In an Ajax web application, for instance, there are cases in which tags, such as
<li> trigger functionalities on the client side when clicked.
Clicking on form input types defined in this variable will be recorded. Types, such as
textarea are not clickable by default because the user usually clicks on it just to gain focus and enter text.
ext.options.structuralTags / ext.options.containerTags
These variables limit the scope of user actions recorded against elements. User actions are not recorded for elements named in the
ext.options.structuralTags variable if those elements have at least one child element (either direct or indirect) specified in the
For example, click actions on
<div> elements are normally recorded, but sometimes those elements are used as containers for other elements. For example, a
<div> may contain a table, which contains many other elements. You can configure the variables not record click actions if you do not want to record click actions against divs used as containers for tables:
This variable contains a list of tags that will never be recorded, even if they satisfy other recording criteria.
This variable defines the order used for creating locators. Locators identify the HTML element at which the user action takes place and are needed during playback to repeat user actions. The default order is constructed such that visual attributes in an element are more favorable when creating the locator:
Enable debugging information to find out which locator builder is used. Choose Parasoft> Preferences> Browser and enable the Print debugging information option. In the following example, the i
d builder is used:
See Browser Settings for more information about this option.
This field is used by the locator
attributesXPathWithIndex builders (see ext.options.locatorBuilders.order). When invoked, this array determines the preferred attributes used. You can add, remove, or reorder attribute names to this array to better customize the locators that get built for elements on your site. Removing an attribute will prevent it from being used by the aforementioned locator builders (which may be important if you know certain attributes on your web page are dynamic and should never be used). Re-ordering the attributes will change the priority of the attributes. The first attributes of the array, like 'id', take precedence to be used in locators over the last elements.
Set this variable to
true to display alert, confirmation, and prompt dialogs during playback. Allowing these dialogs to display during playback requires the user to close the dialogs. The close action can be automated (i.e., with an AutoIT script).
You can use this variable to specify an XPath library for resolving XPath locators used in web scenarios. It applies only to Internet Explorer and Chrome. This option has three possible values:
The variables and values in the users.js script for Firefox are passed as arguments of the
user_pref method. They perform the same functions as the Chrome and Internet Explorer Variables, but have a different format.