• <tfoot id='f2BGs'></tfoot>

      <i id='f2BGs'><tr id='f2BGs'><dt id='f2BGs'><q id='f2BGs'><span id='f2BGs'><b id='f2BGs'><form id='f2BGs'><ins id='f2BGs'></ins><ul id='f2BGs'></ul><sub id='f2BGs'></sub></form><legend id='f2BGs'></legend><bdo id='f2BGs'><pre id='f2BGs'><center id='f2BGs'></center></pre></bdo></b><th id='f2BGs'></th></span></q></dt></tr></i><div id='f2BGs'><tfoot id='f2BGs'></tfoot><dl id='f2BGs'><fieldset id='f2BGs'></fieldset></dl></div>
    1. <legend id='f2BGs'><style id='f2BGs'><dir id='f2BGs'><q id='f2BGs'></q></dir></style></legend>

      <small id='f2BGs'></small><noframes id='f2BGs'>

        • <bdo id='f2BGs'></bdo><ul id='f2BGs'></ul>

        如何在 python 中使用 selenium 将整个文本发送到文本区域而不是逐行发送?

        时间:2023-07-04
        <legend id='LZFLi'><style id='LZFLi'><dir id='LZFLi'><q id='LZFLi'></q></dir></style></legend>

              <bdo id='LZFLi'></bdo><ul id='LZFLi'></ul>

                  <tbody id='LZFLi'></tbody>

                1. <i id='LZFLi'><tr id='LZFLi'><dt id='LZFLi'><q id='LZFLi'><span id='LZFLi'><b id='LZFLi'><form id='LZFLi'><ins id='LZFLi'></ins><ul id='LZFLi'></ul><sub id='LZFLi'></sub></form><legend id='LZFLi'></legend><bdo id='LZFLi'><pre id='LZFLi'><center id='LZFLi'></center></pre></bdo></b><th id='LZFLi'></th></span></q></dt></tr></i><div id='LZFLi'><tfoot id='LZFLi'></tfoot><dl id='LZFLi'><fieldset id='LZFLi'></fieldset></dl></div>

                  <small id='LZFLi'></small><noframes id='LZFLi'>

                2. <tfoot id='LZFLi'></tfoot>
                3. 本文介绍了如何在 python 中使用 selenium 将整个文本发送到文本区域而不是逐行发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的代码将文本逐行输入到网页的文本区域,如何让它一次插入整个文本,有没有解决方案?因为一行一行需要很多时间

                  My code inputs text into the text area of the web page , line by line, how to make it insert the entire text all at once instead, is there a solution for this? because line by line takes a lot of time

                  def Translated_Content(content):
                  
                      driver= webdriver.Chrome("C:\Users\shricharan.arumugam\Desktop\PDF2txt\chromedriver.exe")
                      driver.get('https://translate.shell.com/')
                  
                      input_box = driver.find_element_by_id('translateText')
                      input_box.send_keys(content)
                  
                      translate_button = driver.find_element_by_id('translate')
                      translate_button.click()
                      translated_text_element= driver.find_element_by_id('translatedText')
                      time.sleep(4)
                  
                  
                      translated_text=translated_text_element.get_attribute('value')
                  
                      driver.close()
                  
                      return translated_text
                  

                  推荐答案

                  通过 Python 使用 selenium 将整个文本块发送到