TestProject Forum

Issues with custom xpaths creation

Hi :slightly_smiling_face: I’ve became lost in the world of xpaths, so got an advice to create custom xpath, instead of coping this one, for example:


Found this link: How to Create Custom XPath
Tried in Chrome, right click, Inspect element, founding element and right click on Edit attribute. And my change, of course, was gone after refreshing. What I miss and should I need another tools?

TestProject recorder will create multiple locator strategies XPATH/CSS per element you interact with. As a good start you can simply interact with the desired element or click save element and locate one of the xpaths, here I added an example of dynamic xpaths created by TestProject the first 4 in this example should be less sensitive for changes. You can tweak the xpaths from this point and evaluate their strategy by pressing the "magnifying glass icon

I got it, don’t need any browser extension. It can be done only with TestProject recorder