How can i loop through contacts in group in Discord using selenium in Python? I tried this code, and i have this error: selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of is stale; either the element is no longer attached to the DOM, MindMajix selenium it is not in the current frame context, or the document has been refreshed
whileTrue: num=0try: users_list = driver.find_elements_by_css_selector("div.memberOnline-1CIh-0.member-3W1lQa")for user in users_list: num+=1 user.click() driver.execute_script("arguments[0].scrollIntoView();",user)print('User number {}'.format(num))exceptStaleElementReferenceExceptionandElementClickInterceptedException:print('bad') driver.execute_script("arguments[0].scrollTop = arguments[0].scrollHeight",users_list)