How to detect pseudo element(::after)

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 2
Joined: Mon Feb 12, 2018 2:26 am

How to detect pseudo element(::after)

Post by Hady » Fri May 18, 2018 5:30 am


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

Screenshot_2.png (4.49 KiB) Viewed 1017 times

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7177
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Fri May 18, 2018 8:00 am


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 (52.11 KiB) Viewed 1007 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration