XPath: Does Not End With
<
Combining the ends-with() function with not() allows you to exclude elements whose attribute values end with a specific substring.
You can use the following XPath:
Example 1: //ul[@class='list-group']/li[not(ends-with(@class,'border-danger'))]
- New Item
- Sample Item 0001
- Sample Item 0002
- Sample Item 0003
- Sample Item 0004
- Sample Item 0005
- Sample Item 0006
- Sample Item 0007
- Sample Item 0008
- Sample Item 0009
- Sample Item 0010