CSS-Selector cannot be found

If it works manually then the general expectation I have is that automation should work as well.

Thinking about this and all that has been shared I would suggest try clicking the label element. That is

Click Element  css:[data-testid=autoBrightnessToggleButton]

Another topic I cover when training others on SeleniumLibrary and web testing is understanding the DOM, order and strucutre of element groups and clicking the right element. As a user it generally is obvious where to click. But when seen as the DOM sometimes it is not as simple. I think this may be the case here. There are a few reasons why I say this in this particular case including the results of your waiting and that the label is a parent not a sibling of the input toggle.

2 Likes