-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Enhancementgood first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to match elements by their text content in a case insensitive manner.
Describe the solution you'd like
A clear documented way to be able to match elements by their text value in case insensitive way.
CSS can apply text transforms and for many cases (not all) - tests can be written in clear way by avoiding to deal with casing and styling.
Describe alternatives you've considered
Tried xpath 1.0 (no working) - this
const sanitizedValue = value.replace(/'/gmi, "\\'");
//*[contains(translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') , '${sanitizedValue}')]
neither this
//*[contains(translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') , '${sanitizedValue}')]
Tried xpath 2.0 (no supported by all browser) - NO GO
Additional context
No additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Enhancementgood first picka reasonable task to start getting familiar with the code basea reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested