Ask a Question

How to handle both Upper and Lower case for Xpath assertions in Readyapi

SOLVED
VarugheseKoshy
New Member

How to handle both Upper and Lower case for Xpath assertions in Readyapi

Is there is a Function in groovy script to handle both lower case and uppercase 

 

The below function is for upper case

${="${Run TestCase_Create Client Setup#AddressLine1_PHYS}".toUpperCase()}

The below function is for lower case

${="${Run TestCase_Create Client Setup#AddressLine1_PHYS}".toLowerCase()}

 

Similarly i want a function to manage both upper and lower case.

1 ACCEPTED SOLUTION

Accepted Solutions
nmrao
Community Hero

Re: How to handle both Upper and Lower case for Xpath assertions in Readyapi

Please check below for xpath
https://stackoverflow.com/questions/2893551/case-insensitive-matching-in-xpath

if you want check the string value then use "equalsIgnoreCase". Please see below example
https://www.tutorialspoint.com/groovy/groovy_equalsignorecase.htm


Regards,
Rao.

View solution in original post

2 REPLIES 2
nmrao
Community Hero

Re: How to handle both Upper and Lower case for Xpath assertions in Readyapi

Please check below for xpath
https://stackoverflow.com/questions/2893551/case-insensitive-matching-in-xpath

if you want check the string value then use "equalsIgnoreCase". Please see below example
https://www.tutorialspoint.com/groovy/groovy_equalsignorecase.htm


Regards,
Rao.

View solution in original post

sonya_m
Community Manager

Re: How to handle both Upper and Lower case for Xpath assertions in Readyapi

Thank you, Rao! 

 

@VarugheseKoshy does this help?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: