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}"