I have a script that performs certain actions in the social. networks. If I make the window active (open it and keep it that way), then the script works fine. But if I switch to another application or something similar, then sooner or later NoSuchElementException errors begin to appear.
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".PostHeaderActionsButtonMoreIcon"}