How to handle changing frame name with xpath


I’m new on Katalon since near 2 weeks !

I’m having an issue with frame switching.

Here is the frame i want to access, what makes it different from others is that it is ending with “_right”.


The numbers 1622102377210 change at each page refresh

So i tried this //frame[ends-with(@name,‘_right’)], but katalon can’t find the xpath …

If you have any idea or face this before let me know !
Have a good day :slight_smile:

ends-with function is defined in the W3C XPath 2.0 specification, but no browser support it. You can not use ends-with in Selenium tests.

But you can write an equivalent XPath expression using substring and string-length function of XPath1.0. Both functins are supported by any browser. See the following post for example:


indeed it came from the fact that Chrome does not support xpath 2.0

//frameset/frame[substring(@name, string-length(@name) - string-length(’_left’) + 1) = ‘_left’]

With this xpath I was able to find my frame !

Thanks :slight_smile: