XPath Finder or CSS Selector PlugIn

I currently use an external tool to find relative XPath.

For example for our application a short xpath for the user name input is //input[@name=‘userName’]

The Ugly xpath is… /html/body/app-root/div/div/app-login/div/div/div/mat-form-field[1] and what Katalon generates isn’t much better.

The WebSpy tool in Katalon is useless

It would be handy if the plugin could optionally do the CSS-Selector or relative XPath

Hi @Ian_Fraser

Useless XPaths is an ambiguous notion, can you share screenshots of what the element is, the XPath katalon generated and ideally what would you want it to be ?

From what I See in your user name input’s ideal XPath, this may sound like what you want. You can configure the locator setting in Katalon to just using the attributes within the element that you interacted with (not attributes of its ancestors or neighbors).

Regards !

Hi @Ian_Fraser,

Have you tried to generate Xpath with the Google Chrome development tool?
Ctrl+Shift+C to opent the document inspector, then target the element you want, then Right Click on it and select Copy > Copy Xpath, then past it where you want.
I find the it good enough for Katalon. Sometime I edit it manually for it to fit better in myt test case. So you should have to know Xpath syntax (https://www.w3schools.com/xml/xpath_syntax.asp)

I currently use a tool in Firefox to get Xpaths. I have no issues getting them.

The suggestion here was for a plugin for Katalon to do the same thing so that I don’t have start another app just to get a workable Xpath.

I understand… But rather than a plugin, I would rather pledge for an improvment of the Xpath generation inside Katalon core system. IMHO, it is not a side feature. It’s essential. So, if it does not work properly, it should be fixed or improved.

I agree with you 100% object recognition in Katalon is rubbish. The reason I asked about a plugin for this is that it seems to be their current flavor of the month.

I come from a background of commercial Automation tools I do like Katalon however object recognition is a huge weak point for Katalon.