Working with xPath - EcoSys - Help

EcoSys Functional Automation Framework

Language
English
Product
EcoSys
Search by Category
Help
EcoSys Version
9.1

The best tool to use to find the correct xPath for an object is Chrome.

  1. Open Chrome and navigate to the screen in EcoSys you want to use.

  2. Press F12 to open chrome Developer Tools.

  3. Click on the Elements tab. This gives you the entire DOM of the UI.

  4. Click on the Select Element button in the top left .

  5. 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.

  6. 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.

  7. Use information from the highlighted XML snippet to create the proper XPath. This will be done using the title, or locator attributes. Refer to the below ‘Specific Examples’ section on how to create XPath for specific items in the UI.