How to create a XPATH
XPath is a major element in the XSLT standard, you can be used to navigate through elements and attributes in an XML document.
In the Selenium Test Case, the XPATH is an option to create commands to obtain the location of the elements, the format is the following:
You need to follow these steps:
- Open the tab where the element is.
- Use right click button with the mouse and click in inspect.
- Select the elements tab in the inspector and select your field.
- Copy the highlighted parts to create the XPATH.
- In the example, the XPATH is //input[placeholder='Select tour date']