Replacing IDs equal to use contains - EcoSys - Help

EcoSys Functional Automation Framework

Language
English (United States)
Product
EcoSys
Search by Category
Help
EcoSys Version
8.8

Several xPaths will be in the form of //*[@id="wksNUM1-NUM2_spreadDiv"]/ .

  • WksNUM1 is a unique ID to the specific EcoSys build running. This is not consistent and can change from deployment to deployment.

  • NUM2 is a unique ID based on the configuration element in the database. It changes only if you change the screen layout, spreadsheet, and so on.

To make scripts maintainable, the xPath is retrieved from right click -> get xPath in Developer tools. It must be modified using the following steps.

Starting with xPath of //*[@id="wks-45567-16748_spreadDiv"]/

  1. Replace @id= with contains(@id,

  2. Remove the wks####- from the ID

  3. Add a closing ) after the last "

    That will give an xPath such as //*[contains(@id,"16748_spreadDiv")]/