Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sometimes our script throws error while scrolling down while clearing all chats #89

Open
NavpreetDevpuri opened this issue Oct 30, 2021 · 0 comments

Comments

@NavpreetDevpuri
Copy link
Member

NavpreetDevpuri commented Oct 30, 2021

It is happing most probably due to our script getting the options button from the previous chat and then the next chat loaded but we are trying to click on an element from the previous chat's button

So, to fix it we need to use the _wait_for_an_element_to_deattached for the options button from the previous chat or maybe in some other way

Following error

Traceback (most recent call last):
  File "E:\ee\tithiwa\tithiwa\temp\test.py", line 41, in <module>
    tithiwabot.clear_all_chats()
  File "E:\ee\tithiwa\tithiwa\chatroom.py", line 71, in clear_all_chats
    self._wait_for_presence_of_an_element(SELECTORS.CHATROOM__OPTIONS).click()
 ..etc
  File "C:\Users\ee\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
  (Session info: chrome=95.0.4638.69)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant