xpathselenium-idekatalon-studiokatalon-recorder

Xpath not working when recording with chrome browser


I'm having a problem. When I try to record actions in google chrome using Katalon Studio, sometimes xpath doesnt work well and I need to write xpath attributes by myself. I just want to know if there is a bug or I'm doing it wrong.

I tried also in IE, but I saw the documentations and now I know that IE doesnt have integration with xpath.


Solution

  • I don't think it is a bug. It is just the way the recorder works.

    I would recommend always writing the xpath yourself because the recorder-generated xpath tends to be very fragile and breaks easily.

    For tips on using xpath selectors in Katalon, see here.

    And when I say "writing the xpath yourself" I really do mean "yourself". Sure, ChroPath or similar tools can help, but when you know how to select the desired attribute, you are in more control and, as an added benefit, you get to know the DOM of the app under test better. See here for a short xpath cheatsheet.