Fixes #174 handle new initial popup banner

This commit is contained in:
sebthom
2023-05-15 23:27:56 +02:00
parent 1e31b52a2a
commit 40d6666213

View File

@@ -349,6 +349,12 @@ class KleinanzeigenBot(SeleniumMixin):
LOG.info("Logging in as [%s]...", self.config["login"]["username"]) LOG.info("Logging in as [%s]...", self.config["login"]["username"])
self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/") self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/")
# close redesign banner
try:
self.web_click(By.XPATH, '//*[@id="pre-launch-comms-interstitial-frontend"]//button[.//*[text()[contains(.,"nicht mehr anzeigen")]]]')
except NoSuchElementException:
pass
# accept privacy banner # accept privacy banner
try: try:
self.web_click(By.ID, "gdpr-banner-accept") self.web_click(By.ID, "gdpr-banner-accept")