Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
From this code:
<label for="...">
    ::before
    < span class="label-text"> ... < /span > </label>
    ::after

how could ::after be extracted ?

(Note: Spaces have been inserted inside the span tags, in order to be displayed by this editor.)

It corresponds to the checked state of a checkbox
(that's masked with CSS).
When the checkbox is unchecked, ::after disappears.

I would like to check whether ::after is present or not.

What I have tried:

Currently trying to check this using Robot Framework, whether ::after is present or not.

However, I would need the simplest solution possible for this check.
I'm thinking more of a simple JavaScript that can solve this.
Posted
Updated 2-Jun-21 6:02am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900