Capturing Pseudo Elements
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019
01:54 PM
07-31-2019
01:54 PM
Capturing Pseudo Elements
Hi Team,
Is there a way to capture Pseudo elements using TestComplete?
I have '::after' in my code and I have to capture it to read the Computed Style of it. Now, how do I capture ::after ?
Solved! Go to Solution.
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2019
08:44 AM
08-06-2019
08:44 AM
Hi @jerkins,
Could you please give us more information? Images or some info about what you have inside :after will help.
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019
06:59 AM
08-09-2019
06:59 AM
Hi Tanya,
Thanks for the reply. I figured out the solution myself which is pasted below.
//object is the node inside which pseudo element is available
var window = object.ownerDocument.defaultView;
var style = window.getComputedStyle(object,":after");
var computedStyle = style["content"];
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019
09:44 AM
08-09-2019
09:44 AM
Hi @jerkins,
I'm happy to hear this!
Thanks for sharing the solution with us. Good luck in testing 🙂
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
