Automating Web Controls

Web controls are JIA's representation of the actual DOM elements in a web page. Each page can have several web controls.

Instances of web controls are created when the page instance is created, regardless of whether or not the controls appear on the page. You therefore need to verify that a control is available before using any of the web control APIs. Accessing a control that isn't available will result in an exception.

Each control has several common bindings to identify it on the page. In addition, a free-style jQuery selector is available for advanced use cases.

Web Control Repository Definition

Binding attributes of web controls are listed and described in the following table. When building a Repository definition, keep the following guidelines in mind:

Each control is searched by its type, in addition to other binding attributes.

The Name, Id, and Class attributes are used together to match elements.

When a Selector attribute is defined, no other binding attributes should be used.

Attribute  Name

Description

Required

Default Value

ProgId

Name of the page member in the application class.

Yes

 

Mandatory

Indicates whether or not the control is required for creating an instance of the page.

No

false

Name

Finds the control based on the name attribute.

No

 

Id

Finds the control based on the id attribute.

No

 

Class

Finds the control based on the class attribute.

No

 

InnerText

Find controls containing the specified text. Note: As this attribute matches every HTML object in the hierarchy that contains the text, make sure that your Repository definition is specific enough.

No

 

Index

This attribute is used to define which item should be returned in the event that selectors return more than one result.

No

 

Scope

Determines the extent of the search for the control (relative to the parent). Supported values are:

Children: The search includes only direct children of the parent.

Descendants: The search includes all descendants of the parent.

DescendantsAndFrames: The search involves all descendants, including the content within frames of descendants.

No

Descendants

Selector

Finds the control based on a free style jQuery selector.

No

 

The following example presents a Repository definition for the Search button on the Contacts page of the SalesForce application:

<WebApplication ProgId="SalesForce" Type="Single">

    <WebPage ProgId="ContactsPage" URL="http[s]://jacada.salesforce.com/.*/Contacts.*" Mode="Single">

        <WebButtonControl ProgId="SearchBtn" Id="sBtn" Class="sf-button-new"/>

The following sections present:

Web Control APIs

Web Control Behaviors

JavaScript Transaction for Web Control APIs

Supported Web Controls