Hi,
I am facing an issue about xpath changes which seems to be not controlled by developers. Earlier, Xpath editor identified the elements as tables and controlIDs. Now it has been changed to containers and cells.
For Ex.:
old Xpath:
/html/body/form/div[3]/div[2]/div/div[15]/table/tbody/tr/td/div/div/div[2]/table/tbody/tr/td/span/div/div[1]/div/table/tbody/tr[1]/td[1]/table/tbody/tr[2]/td[2]/input[1]//*[@id="ctl00_StartContent_UCNk_ctl00_ctrl_3"]
New Xpath:
/container/container[@accessiblerole='Grouping']/container[@accessiblerole='Grouping']/container[2]/table[@accessiblerole='Table']//container/container[@accessiblerole='Grouping']/table[@accessiblerole='Table']//container/container[@accessiblerole='Grouping']/container[1]/?/?/table[@accessiblerole='Table']/row[1]/cell[@accessiblename>'Anrede, Titel Vorname Nachname*']/table[@accessiblerole='Table']/row[2]/cell[@accessiblename=' ']/text[1]
I am doing automation for web applications. It's such a pain to rebuild all the repository items. Any idea why it has been changed the Xpath with containers.
Xpath changed from tables, Control id's to containers and cells
Xpath changed from tables, Control id's to containers and cells
Last edited by R_CH on Thu May 27, 2021 7:21 am, edited 1 time in total.
Re: Xpath changed from tables, Control id's to containers and cells
Hi,
Unfortunately, it's pretty hard to tell why the xpaths changed? The most probably reason is, that the application under test now uses different UI technology? Another possibility is, that you've played with the xpath weight editor and changed something there? In this case, Ranorex could return different xpaths, based of the xpath weight you eventually applied?
Check these topics, regarding xpath weights and examine your actual settings...
https://www.ranorex.com/help/latest/ran ... e-weights/
https://www.ranorex.com/help/latest/ran ... namic-ids/
https://www.ranorex.com/blog/automated- ... namic-ids/
Unfortunately, it's pretty hard to tell why the xpaths changed? The most probably reason is, that the application under test now uses different UI technology? Another possibility is, that you've played with the xpath weight editor and changed something there? In this case, Ranorex could return different xpaths, based of the xpath weight you eventually applied?
Check these topics, regarding xpath weights and examine your actual settings...
https://www.ranorex.com/help/latest/ran ... e-weights/
https://www.ranorex.com/help/latest/ran ... namic-ids/
https://www.ranorex.com/blog/automated- ... namic-ids/
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration