Skip to content

Commit

Permalink
Merge pull request #123 from ichdasich/message_toogle
Browse files Browse the repository at this point in the history
Message toogle
  • Loading branch information
mtsonline authored Apr 11, 2021
2 parents 775f256 + e474f57 commit 2d6749d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 JavascriptException
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
Expand Down Expand Up @@ -167,13 +168,16 @@ def bbb_browser():
time.sleep(10)
if not args.chat:
try:
element = browser.find_elements_by_css_selector('button[aria-label="Users and messages toggle"]')[0]
element = browser.find_elements_by_css_selector('button[aria-label^="Users and messages toggle"]')[0]
if element.is_enabled():
element.click()
except NoSuchElementException:
logging.info("could not find users and messages toggle")

browser.execute_script("document.querySelector('[aria-label=\"Users and messages toggle\"]').style.display='none';")
try:
browser.execute_script("document.querySelector('[aria-label=\"Users and messages toggle\"]').style.display='none';")
except JavascriptException:
browser.execute_script("document.querySelector('[aria-label=\"Users and messages toggle with new message notification\"]').style.display='none';")
browser.execute_script("document.querySelector('[aria-label=\"Options\"]').style.display='none';")
browser.execute_script("document.querySelector('[aria-label=\"Actions bar\"]').style.display='none';")
browser.execute_script("document.getElementById('container').setAttribute('style','margin-bottom:30px');")
Expand Down

0 comments on commit 2d6749d

Please sign in to comment.