Buton state detection
-
Hello,
does anyone have an idea how i can see the state of the slider buton?State off:
<label for="smart-notifications-settings-toggle" class="ScToggleButton-sc-796zbf-2 erOoiO tw-toggle__button"> ::after == $0 </label>
state on:
<label for="smart-notifications-settings-toggle" class="ScToggleButton-sc-796zbf-2 erOoiO tw-toggle__button"> ::before == $0 ::after == $0 </label>
i don't know how to get the info before and after
-
Получай переменную CSS стиля, который изменяется при взаимодействии.
-
the css style does not change, unfortunately, this is what I tried first.
>CSS> :nth-child(2) > :nth-child(1) > :nth-child(1) > div > label
-
if someone should have the problem, here is the solution:
Use Execute Javascript on Element:
let element = document.querySelector(':nth-child(2) > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > div > input'); [[Variable]] = element.checked;
it then returns true or false.