This commit is contained in:
恍兮惚兮 2024-05-26 16:22:23 +08:00
parent adaa5e8d9c
commit 9335e8be40

View File

@ -8,13 +8,9 @@ class TS(basetransdev):
return ".bing.com/translator/" in url
def translate(self, content):
self.Runtime_evaluate(
"""document.getElementById('tta_clear').click();document.getElementById('tta_input_ta').value=`{}`;
document.getElementById('tta_input_ta').click();
""".format(
content
)
)
self.Runtime_evaluate('document.getElementById("tta_clear").click();')
self.Runtime_evaluate('document.querySelector("#tta_input_ta").click();')
self.send_keys(content)
return self.wait_for_result(
"document.getElementById('tta_output_ta').value", " ..."
)