Identify web elements
A Browser app in ScoutIT AI can sign in to your application by typing into fields and selecting buttons. To do this, it needs to know how to find each element on the page. This page shows you how to find a reliable identifier for each one.
Before you start
- Use Google Chrome, or another browser with developer tools.
- Open the app in ManageIT → Manage Apps with Workflow Type set to Browser. The Web Elements section appears. See Manage apps.
Find an element's identifier
- In Chrome, open the page you want ScoutIT AI to use, such as your sign-in page.
- Right-click the field or button you want, then choose Inspect.
- In the panel that opens, look at the highlighted HTML for the element.
- Note an attribute that identifies the element, such as its
id,nameorclass.
Choose how to find the element
In each Web Elements row, Find HTML Control By sets how ScoutIT AI looks for the element. Choose the most stable option the element offers:
| Option | Use it when |
|---|---|
| ID | The element has an id attribute that is unique on the page and doesn't change. This is the most reliable choice. |
| Name | The element has a name attribute, common on form fields. |
| CSS | You can describe the element with a CSS selector. |
| XPath | No simpler attribute is unique. XPath breaks more easily when the page changes. |
| Class | The element's class is unique on the page. Many elements share classes, so check this carefully. |
Avoid values that change each time the page loads, such as long random strings.
Fill in a web element row
- In HTML Control Input Type, choose Type for a field ScoutIT AI types into, or Click for a button or link it selects.
- In Find HTML Control By, choose the option from the table above.
- In HTML Control Identifier, enter the identifier you found, such as the value of the
idattribute. - For a Type step, enter the text to type in HTML Control Value.
- Select Add Action to add the next step.
- To remove a step, select the Remove Web Element icon at the end of its row.
Test the steps
- Select Test Auto Login.
- Check the result for each element. A tick means ScoutIT AI found it. A cross means it didn't, and an error explains why.
- For any cross, go back to the page, inspect the element again, and try a more stable identifier.