How to detect pseudo element(::after)

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Hady
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

Hello

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

thanks
Attachments
Screenshot_2.png
Screenshot_2.png (4.49 KiB) Viewed 195 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
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

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
GetInnerHTML.png (52.11 KiB) Viewed 185 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