From 51a71f1098953a2a281c8660b29601905a7df850 Mon Sep 17 00:00:00 2001 From: KryptoST <30755854+KryptoST@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:16:32 -0500 Subject: [PATCH] Update deepl_scrap.py --- srtranslator/translators/deepl_scrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtranslator/translators/deepl_scrap.py b/srtranslator/translators/deepl_scrap.py index adfc1ef..31148f1 100644 --- a/srtranslator/translators/deepl_scrap.py +++ b/srtranslator/translators/deepl_scrap.py @@ -96,7 +96,7 @@ def _set_language(self, language: str, dropdown_class: str) -> None: Button(self.driver, "CLASS_NAME", dropdown_class).click() # Get the language button to click based on is dl-test property or the text in the button - xpath_by_property = f"//button[@dl-test='translator-lang-option-{language}']" + xpath_by_property = f"//button[@data-testid='translator-lang-option-{language}']" x_path_by_text = f"//button[text()='{self.languages[language]}']" xpath = f"{xpath_by_property} | {x_path_by_text}"