11-05-23 09:56 AM
I created an application modeller for web application and also captured the element, but the attribute id in our web application changes continuously, so how can we manually update xpath in application modeller?
11-05-23 10:15 AM
Hi @UrmilaPatil - I am sure stability could be achieved picking other attributes as well or using UIA or AA modes with match Index and couple other parameters but if you are looking to play around with Xpath - Try finding a Label or related element which can be highlighted without the use of WebPath/Xpath and read its Xpath - Try comparing the Xpath of your original element with this Xpath -
Just in above example : Button/Label Items has enough attributes (For ex Web Value, Web Text, Element Type & Match Index) to match without Xpath attribute - I would read its Xpath using read stage and basis of my observation (which I have compared on NotePad) on how these values changes my original required element - and would amend/add/replace to create a patterned Xpath for my element.
but firstly it should be compared enough to know the patterns/behaviour when changing and then keeping the required element Xpath as Dynamic to pass this newly created Xpath through params.
------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.
Regards,
Mukesh Kumar - Senior Automation Developer
NHS, England, United Kingdom, GB
------------------------------
11-05-23 01:46 PM
Glad to chat on this if you wish. I'd suggest staying away from XPath and Attr IDs if you can. Pehaps consider Class and CSS Selector.
11-05-23 02:48 PM
@UrmilaPatil
If you are experiencing changing suffixes on on the "id" attribute of the element and you have BP v6.4 and above, you might want to look into XPath expressions in your "Web Path" or "Web Path/XPath" attributes where something that spies like so:
The XPath expressions give you the speed of the absolute XPaths with the flexibility of dealing with dynamic web pages.