Skip to content

Commit

Permalink
Fix #194 Sell directly slider not switching
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 31, 2023
1 parent df12920 commit d2f3ad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kleinanzeigen_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def publish_ad(self, ad_file:str, ad_cfg: dict[str, Any], ad_cfg_orig: dict[str,
try:
if sell_directly and ad_cfg["shipping_type"] == "SHIPPING" and ad_cfg["shipping_options"] and price_type in {"FIXED", "NEGOTIABLE"}:
if not self.webdriver.find_element(By.ID, "buy-now-toggle").is_selected():
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//span[contains(@class, "Toggle--Slider")]')
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//div[contains(@class, "Toggle--Slider")]')
elif self.webdriver.find_element(By.ID, "buy-now-toggle").is_selected():
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//span[contains(@class, "Toggle--Slider")]')
except NoSuchElementException as ex:
Expand Down

0 comments on commit d2f3ad4

Please sign in to comment.