I'm trying to click on element using below code and its working fine if variable does not have special characters.
Values that passed in variable are:
Product Passed
Test Message -> Failed
Double Units 13/2" -> failed
I cannot go with partial text, because sometimes only difference between two element is special character.
String Answertoselect = ElementName.replaceAll("'", "\\\\'");
String selectanswer = Answertoselect.replaceAll(" ", "${nbsp}");