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.

2 REPLIES 2
nmrao
Champion Level 2

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.
sonya_m
SmartBear Alumni (Retired)

Thank you, Rao! 

 

@VarugheseKoshy does this help?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: