How can I declare the following xpath value as a string variable in C#?
Value: //*[contains(concat( " ", @class, " " ), concat( " ", "lit-movie", " " ))]
How can I declare the following xpath value as a string variable in C#?
Value: //*[contains(concat( " ", @class, " " ), concat( " ", "lit-movie", " " ))]
You have to use escape characters (use backslash), so "
should be replaced by \"
:
string xpath = "//*[contains(concat( \" \", @class, \" \" ), concat( \" \", \"lit-movie\", \" \" ))]";