I would like to retrieve parent web element of pseudo element (If it could be named parent), but as far as I know selenium's methods of searching for web elements are not suitable for searching pseudo elements.
However, JavaScript manipulates pseudo elements freely, so I would like to ask, if there is a method that could return css selector/xpath of parent web element for pseudo element (To be more precise "::after") in JavaScript.
In other words, I've got this:
<html>
<body>
<label id="parent">
<span> Some text </span>
::after
</label>
</body>
</html>
And I would like to get that:"#parent"
Thank you in advance.