From 6c74df864a75abdb1b3c70a4755c9b04fe6cc5ff Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Mon, 6 Sep 2021 02:04:25 -0600 Subject: [PATCH] update deepl devtools --- extensions/devtoolsdeepltranslate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/devtoolsdeepltranslate.cpp b/extensions/devtoolsdeepltranslate.cpp index 8a90652..2ef920b 100644 --- a/extensions/devtoolsdeepltranslate.cpp +++ b/extensions/devtoolsdeepltranslate.cpp @@ -130,9 +130,9 @@ std::pair Translate(const std::wstring& text, TranslationPar DevTools::SendRequest("Runtime.evaluate", FormatString(LR"({"expression":" document.querySelector('.lmt__language_select--source').querySelector('button').click(); - document.evaluate(`//button[text()='%s']`,document.querySelector('.lmt__language_select__menu'),null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue.click(); + document.evaluate(`//*[text()='%s']`,document.querySelector('.lmt__language_select__menu'),null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue.click(); document.querySelector('.lmt__language_select--target').querySelector('button').click(); - document.evaluate(`//button[text()='%s']`,document.querySelector('.lmt__language_select__menu'),null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue.click(); + document.evaluate(`//*[text()='%s']`,document.querySelector('.lmt__language_select__menu'),null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue.click(); "})", codes.at(tlp.translateFrom), codes.at(tlp.translateTo))); for (int retry = 0; ++retry < 100; Sleep(100))