Related pages:

Your synthetic script simulates end-user interactions, so you'll need to be able to locate the DOM elements of your web pages. For example, your script might click on buttons, links, or enter text into text fields: this requires your script being able to locate and then select relevant HTML elements.

Methods for Locating Elements

The Selenium WebDriver library provides CSS selectors and XPath statements for selecting HTML elements. See 4. Locating Elements for the list of the library methods and usage examples.

You can also use the AppDynamics WebDriver Scripting Assistant, a Chrome extension, to help you create the selector statements.

Best Practices for Locating Elements

When locating elements, you are recommended to do the following. Think of it as a checklist.