I am trying to get the value of a CSS attribute "content" with:
WebElement plusOrMinusSign = currentEntityTypeLevel1.findElement(
The string 'i[@class='tree-branch-head']::after' is not a valid XPath expression.
<i class="tree-branch-head" ng-class="iBranchClass()" ng-click="selectNodeHead(node)">::after
You are using
i[@class='tree-branch-head']::after is not a valid XPath, it is a mixture of XPath notation (
i[@class='tree-branch-head']) and CSS (
You should use
By.cssSelector and a valid CSS selector, for example
i.tree-branch-head:after. This would work if Selenium accepted pseudo elements, which it does not.
To work around this problem, you can either use Chromium, that generates extra fake elements