The best tool to use to find the correct xPath for an object is Chrome.
-
Open Chrome and navigate to the screen in EcoSys you want to use.
-
Press F12 to open chrome Developer Tools.
-
Click on the Elements tab. This gives you the entire DOM of the UI.
-
Click on the Select Element button in the top left
.
-
Navigate to the element you want to find the xPath for. Notice that it will highlight different areas of the UI as you mouse over them. When you get to the element, get the blue highlight to be as close to only covering the element as possible.
In most of the cases, highlighting the object (Buttons, links, and so on) will provide the required xPath. In certain cases, such as Spreadsheets, drop-downs, the item to highlight will be explained in the keyword documentation.
For example, following image shows the Refresh button on the Forecasting Module highlighted.
-
Click on the object. You will notice that the click does not happen, but in the Developer Tools, the Elements window has highlighted the element.
-
Right-click on the highlighted XML snippet, select Copy and then Copy XPath.
-
Go to your text editor and paste it. You must see - //*[@id="RefreshButton-3515"]
Unless stated, some objects might require special steps to find the xPath or modification and will are described in the section below.