FAQ

Web testing | “InputFields“ not recognized
General | Create a dump

Q: Web testing | “InputFields“ not recognized

How can I add meaningful labels to input fields? When testing my web application all input fields are called “Text”. Therefore it is hard to distinguish between them when recording a test with Fabasoft app.test.

A:

For automating website tests with Fabasoft app.test so called “patterns” are used. Those patterns are contained on a website. Such a pattern can be for example an element structuring your website like a “DIV” with a specific “class” attribute or a form.

Those patterns are used to create a “tree” representing your website’s HTML-structure. Each HTML-element of your website gets analyzed and a matching pattern is identified. According to this pattern the element is added to the “tree”. The “tree” displays the names (labels) of the elements.

As each website contains different patterns, Fabasoft app.test provides a tool to “show” app.test all existing patterns of a website. The “Control Specification Designer” provides an integrated editor for designing XPath-expressions to locate elements within a website's structure.

Simply by “showing” the editor the parts of the website that belong together, so called “patterns” are generated. By applying them throughout the websites’ structure, tests become readable, understandable and reusable. This “specification file” can be integrated into the tests immediately. The Control Specification Designer is included in the Fabasoft app.test Studio, the appropriate view can be added by clicking on Window > Open Perspective > other > "app.test Specification Desing"

To support the most common patterns out-of-the-box a “default Specification File” is provided. When this default Specification File is used in a test, a yellow bar is displayed in the web browser window.

Further information about the structure and functionality of patterns is available in the online help.

Here is a short example explaining the functionality of the “default pattern” “InputField”. The name of an InputField is set as follows:

#InputField
:expression descendant::INPUT[@type="text" or @type="password" or @type="file" or not(@type)]
:expression descendant::TEXTAREA
:label attribute::title
:label attribute::name
:label attribute::id
:label attribute::type
:click
:get attribute::value
:get (result = Enabled)
:set

To identify elements on a website all fields with the name “INPUT” and either the attribute “type” with the value “text”, “password”, “file” or no attribute “type” at all are determined. In addition all elements with the name “TEXTAREA” are handled as “InputField”.

The “label” (the name displayed in the “tree”) is set by the “labels” of the elements. It is checked if a value is set in the attribute “title”, “name”, “id” or “type”. When there is no such value set, the element is displayed in the “tree” without a name.

“:set” and “:get” are used to set or get a value (e.g. :get attribute::value, :get (result = Enabled), :set).

General | Create a dump

The app.test support requested a dump. How do I create a “dump”?

A:

“Dumps” are used to analyze specific problems. To create a “dump” while recording a test simply open the context menu in the Recorder window an click “Generate Dump”. A dump contains a screenshot of the current browser window, the websites HTML and the “Control Tree” of Fabasoft app.test.

generate a dump