The ends-with
function is part of xpath 2.0 but browsers (you indicate you’re testing with chrome) generally only support 1.0. So you’ll have to implement it yourself with a combination of string-length
, substring
and equals
substring(@id, string-length(@id) - string-length('register') +1) = 'register'