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.
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.
When locating elements, you are recommended to do the following. Think of it as a checklist.
Understand the following about your application:
the DOM structure
which pages are dynamically and statically loaded
which elements of a page are loaded and visible.