What is the use of Object's Xpaths portion of an element?

I just want to ask about Object’s Xpaths portion under XPath Selection Method.


Does it mean that we can input as much Xpaths as we can?

Yes you can manually input the xpath for the element you are trying to locate. Only put what you need for it to be located every time, not necessary to “put as much as we can”.

Well not exactly as many as possible but the challenge is I have some XPaths that uses the innertexts of the elements whenever I am dealing with dynamic tables that doesn’t have any id. (like the example screenshot above)

Now since we use innertexts, this might change when the application supports other language. Meaning, the XPath won’t be located when I change the language.

So can I put say 3 XPaths to handle different languages?

Good question I want to take part in.

Can I input a list of xpaths and Katalon will go through them all?
Means something like and “or” rule for xpaths in an object?

In this case do I have to leave selected locator empty?

Well running again over this problem I can say that emtpying the selected locator and entering 2 different xpaths whereas one of them is the correct one isn’t working.

so how is this function working?


Please put the element’s XPath in the Selected Locator field.

Which of the multiple ones?

Just to tell you that you cannot have multiple XPaths to a single element. The aspect of locating an element is not an OR situation, but an AND. This means that all conditions must be true to find the element. So, if any criteria of the element is false, then the element will not be found.

I think you need to create 1 element for each item for each language, or find another unique aspect of the element besides text. Maybe you could have the element’s name the same except for a .ENG. or .FRE. or .SPA. within the name, then do a global search and replace to change between one language and another ??? Probably not a very good idea.


Ok understood. If the language or currency is part of a xpath I solve it via a variable.