You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
anElement().withText("Some text with 'ABC' quoted with single quotes")
with this error:
InvalidSelectorError: Unable to locate an element with the xpath expression //*[text() = 'Some text with 'ABC' quoted with single quotes'] because of the following error:
SyntaxError: The expression is not a legal expression.
On inspection of com.lmax.elementspec.XPathElementSpecification#withText :
appendCondition("text() = '" + text + "'")
The code could detect single/double quotes and use the 'other' quote to quote the string for the test.
So it is impossible to test a single string that contains both types of quotes without complex construction of the test string by concat-ing litertals; e.g.:
*[@text = concat('"', "'")]
The text was updated successfully, but these errors were encountered:
E.g. this spec fails
with this error:
On inspection of
com.lmax.elementspec.XPathElementSpecification#withText
:The code could detect single/double quotes and use the 'other' quote to quote the string for the test.
The XPath Recommendation (http://www.w3.org/TR/xpath) states:
So it is impossible to test a single string that contains both types of quotes without complex construction of the test string by
concat
-ing litertals; e.g.:*[@text = concat('"', "'")]
The text was updated successfully, but these errors were encountered: