Skip to content

Commit

Permalink
misc: Disabled log prints for Live Chat closing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vel-San committed Feb 15, 2024
1 parent 17fdcb8 commit 447e73c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ As of now, there are no timeouts, bot checks, or captchas on the website (which
- [ ] Make a portable docker image of the bot that can be hosted anywhere
- [ ] Add "excluded_applications.json" that shows all applications that were excluded by the filter
- [X] Add color_printer class into the works with the logger
- [ ] Notify via e-mail whenever the bot applies to an application
- [X] Notify via e-mail whenever the bot applies to an application
- [X] Download the 'Angebote' page as an HTML for records keeping
- [X] Download the viewing of an apartment as a PDF (Available on WBM) for records keeping
- [ ] Automatically detect if internet network connection is down and pause/restart once back
Expand Down
10 changes: 5 additions & 5 deletions wbmbot_v2/helpers/webDriverOperations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
from helpers import constants, notifications
from httpsWrapper import httpPageDownloader as hpd
from logger import wbm_logger
from selenium.common.exceptions import (NoSuchElementException,
StaleElementReferenceException,
TimeoutException)
from selenium.common.exceptions import (
NoSuchElementException,
StaleElementReferenceException,
TimeoutException,
)
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
Expand Down Expand Up @@ -273,11 +275,9 @@ def close_live_chat_button(web_driver):

# Click the 'Close Live Chat' button
web_driver.find_element(By.XPATH, close_button_xpath).click()
LOG.info(color_me.green("Live Chat dialog has been closed."))
return True
except TimeoutException as e:
# If the Close Live Chat does not appear within the timeout, log a message
LOG.warning(color_me.yellow("No Live Chat dialog appeared within the timeout."))
return False


Expand Down

0 comments on commit 447e73c

Please sign in to comment.