diff --git a/chat.py b/chat.py index 58aa170..7ba395e 100644 --- a/chat.py +++ b/chat.py @@ -83,7 +83,8 @@ def bbb_browser(): time.sleep(6) - element = EC.invisibility_of_element((By.CSS_SELECTOR, '.ReactModal__Overlay')) + # wait for message input: + element = EC.presence_of_element_located((By.ID, 'message-input')) WebDriverWait(browser, selenium_timeout).until(element) element = browser.find_element_by_id('message-input') diff --git a/stream.py b/stream.py index 8842da2..491f7bb 100644 --- a/stream.py +++ b/stream.py @@ -7,6 +7,7 @@ from bigbluebutton_api_python import util as bbbUtil from selenium import webdriver from selenium.webdriver.common.keys import Keys +from selenium.common.exceptions import ElementClickInterceptedException from selenium.common.exceptions import JavascriptException from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.chrome.options import Options @@ -163,7 +164,10 @@ def bbb_browser(): if element.is_enabled(): element.click() except NoSuchElementException: - # ignore (chat might be disabled) + # ignore (chat might be disabled) + logging.info("could not find chat input or chat toggle") + except ElementClickInterceptedException: + # ignore (chat might be disabled) logging.info("could not find chat input or chat toggle") time.sleep(10)