I am trying to do a bot that automatically finds an available room for Zoom (so I can troll, because I'm bored).
It works, but from time to time it gets an error that the Submit button click was intercepted. I want my program to continue after the error, but it just stops. How can I fix this?
Here's the code:
browser.get("https://www.zoomus.cn/j/1313141151?_x_zm_rtaid=GJwf9jNWTHasYv14WqiBZg.1593889587120.4853db3668ae0d51573cd748d7f1ded4&_x_zm_rhtaid=338")
class Buttons:
ID_Box = browser.find_element_by_id("join-confno")
Submit_BTN = browser.find_element_by_id("btnSubmit")
def CheckElement_Exist():
try:
browser.find_element(By.ID, "join-confno")
except NoSuchElementException:
return False
pass
return True
while CheckElement_Exist():
Number_Random = choices(availableSymbols_Code, k=randint(9 + 5, 11 + 5))
attempts += 1
Buttons.ID_Box.send_keys(''.join(Number_Random))
Buttons.Submit_BTN.click()
time.sleep(0.5)
Buttons.ID_Box.clear()
time.sleep(3.5)
time_end = time.time()
time_took = round(time_end - time_end, 2)
Saved_Number = Number_Random
print(Fore.GREEN + "Room found in " + Style.RESET_ALL + Fore.RED + time_took + Style.RESET_ALL + Fore.GREEN
+ " seconds. Number is: " + Style.RESET_ALL + Fore.RED + Saved_Number + Style.RESET_ALL + Fore.GREEN + ".")
Here's the error:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a id="btnSubmit" role="button" href="javascript:;" class="btn btn-primary user submit disabled" disabled="disabled">...</a> is not clickable at point (324, 357). Other element would receive the click: <div class="controls">...</div>