Added compatibility with phoneNumberVisibility checkbox. (#81)

This commit is contained in:
tllsngnzlz
2022-05-30 09:55:43 +02:00
committed by GitHub
parent 845cf88606
commit c44403b7e8

View File

@@ -469,6 +469,13 @@ class KleinanzeigenBot(SeleniumMixin):
# set contact phone # set contact phone
############################# #############################
if ad_cfg["contact"]["phone"]: if ad_cfg["contact"]["phone"]:
try:
if not self.webdriver.find_element(By.ID, "postad-phonenumber").is_enabled():
self.webdriver.find_element(By.ID, "phoneNumberVisibility").click()
pause(2000)
except NoSuchElementException:
# ignore
pass
self.web_input(By.ID, "postad-phonenumber", ad_cfg["contact"]["phone"]) self.web_input(By.ID, "postad-phonenumber", ad_cfg["contact"]["phone"])
############################# #############################