You have this:
//iframe[ends-with(@id,'iframe')]
Unfortunately no browser supports the XPath 2.0 function ends-with()
. It would never work.
You can write an alternative expression using XPath 1.0 functions substring
and string-length
:
//iframe[substring(@id, string-length(@id) - string-length('iframe') +1) = 'iframe']