Application Xpath changing frequently
Posted: Mon Aug 12, 2019 7:52 am
Hi,
We are doing automation on desktop application (Built using Dev-Express controls plugin).
As we are following Agile (Sprint) methodology where we are getting new build in each sprint. In the product increment cycle, we are facing issue about xpath changes which seems to be not controlled by developers. As, Dev-Express people use to upgrade their version where lot of changes happens.
We had a discussion with developers on this issue and they told that they are not doing anything on changing this containers or tree items or indicators. It might be issue with devexpress controls. So, could you please suggest a approach which we should take to automate our application so that with every product increment we'll not face issue with object identification.
Refer attached snapshots.
For e.g.
1) Earlier there was container with caption now got changed to container with number.
Old Xpath - /progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[@caption='']
New Xpath - /progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[2]
2) Earlier there was tree items which now get changed to Indicators which even changes on collapse and expand.
Old Xpath -progressbar/?/tree/treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]/container[@automationid='ItemsHost']/treeitem[1]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'^Built-in\ Loop-A']
Old Xpath - treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'^Built-in\ Loop-B']
Old Xpath - progressbar/picture?[6]/?/?/treeitem[2]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'Node']
3) Earlier there was no container and now there is container which is one of the issue to find objects.
Old Xpath - progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[@caption='']/container[$sRow]//text[1]
New Xpath - progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[8]/container[2]/container[$sRow]//text
4) Earlier there was no list but in new build there is list
Old Xpath - /form[@automationid='me']/?/?/container[@automationid='PART_AutoHideControl']/?/?/list[2]/container[@automationid='PART_ItemsPresenter']/button[@text='Multiple Point Wizard']
New Xpath - /form[@automationid='me']/?/?/container[@automationid='PART_AutoHideControl']/list/list[1]/list[2]/container[@automationid='PART_ItemsPresenter']/button[@text='Multiple Point Wizard']
I have attached snapshots for navigation tree item where indicators are getting changed on expand and collapse. How we could able to identify this objects ? Please suggest.
Refer attached snapshots.
Let me know if any other information required.
Thanks
We are doing automation on desktop application (Built using Dev-Express controls plugin).
As we are following Agile (Sprint) methodology where we are getting new build in each sprint. In the product increment cycle, we are facing issue about xpath changes which seems to be not controlled by developers. As, Dev-Express people use to upgrade their version where lot of changes happens.
We had a discussion with developers on this issue and they told that they are not doing anything on changing this containers or tree items or indicators. It might be issue with devexpress controls. So, could you please suggest a approach which we should take to automate our application so that with every product increment we'll not face issue with object identification.
Refer attached snapshots.
For e.g.
1) Earlier there was container with caption now got changed to container with number.
Old Xpath - /progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[@caption='']
New Xpath - /progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[2]
2) Earlier there was tree items which now get changed to Indicators which even changes on collapse and expand.
Old Xpath -progressbar/?/tree/treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]/container[@automationid='ItemsHost']/treeitem[1]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'^Built-in\ Loop-A']
Old Xpath - treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]/container[@automationid='ItemsHost']/treeitem[2]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'^Built-in\ Loop-B']
Old Xpath - progressbar/picture?[6]/?/?/treeitem[2]
New Xpath - progressbar/picture[6]/tree/container[8]//text[@caption~'Node']
3) Earlier there was no container and now there is container which is one of the issue to find objects.
Old Xpath - progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[7]/container[@caption='']/container[$sRow]//text[1]
New Xpath - progressbar/picture[8]/indicator[@automationid='PART_LoadingPanel']/table/container[8]/container[2]/container[$sRow]//text
4) Earlier there was no list but in new build there is list
Old Xpath - /form[@automationid='me']/?/?/container[@automationid='PART_AutoHideControl']/?/?/list[2]/container[@automationid='PART_ItemsPresenter']/button[@text='Multiple Point Wizard']
New Xpath - /form[@automationid='me']/?/?/container[@automationid='PART_AutoHideControl']/list/list[1]/list[2]/container[@automationid='PART_ItemsPresenter']/button[@text='Multiple Point Wizard']
I have attached snapshots for navigation tree item where indicators are getting changed on expand and collapse. How we could able to identify this objects ? Please suggest.
Refer attached snapshots.
Let me know if any other information required.
Thanks