Page 1 of 1

How to detect pseudo element(::after)

Posted: Fri May 18, 2018 5:30 am
by Hady
Hello

I have to check the pseudo element is exists or not. i have tried with xpath but it did not work.

thanks

Re: How to detect pseudo element(::after)

Posted: Fri May 18, 2018 8:00 am
by odklizec
Hi,

I'm afraid, you are probably out of luck here? The thing is, that the xpath does not support colons. So there is no way to create an xpath for this style selector. In my opinion, your only hope is to create an xpath for the element, which is suppose to contain this selector ?(span tag) and then obtain its inner HTML code, via GetInnerHTML action. This should read the HTML content of pointed element and then you can parse the obtained content. I don't think there is any other way around this?
GetInnerHTML.png