There is one missing closing bracket in the first code snippet:
/*[starts-with(attribute^="value"]
should be:
/*[starts-with(attribute^="value")]
The first code example for XPath uses CSS syntax
//*[starts-with(attribute^="value"]
this is not correct, should be
//*[starts-with(@attribute, "value")]
Once I added all the changes, I could pass level 18 with solution:
//*[starts-with(@for, "Sa")]
I figured it out by checking out some code examples on StackOverflow for the starts-with selector. Also looking back at other levels it was plain that something is not right in level 18.
Hi @TopSwagCode
XPath syntax requires the @ sign before attribute
/*[starts-with(attribute^="value"]
should be:
/*[starts-with(attribute^="value")]
//*[starts-with(attribute^="value"]
this is not correct, should be
//*[starts-with(@attribute, "value")]
Once I added all the changes, I could pass level 18 with solution:
//*[starts-with(@for, "Sa")]
I figured it out by checking out some code examples on StackOverflow for the
starts-with
selector. Also looking back at other levels it was plain that something is not right in level 18.Thanks for the tutorial, great stuff!