如何使用python';s selenium模块查找标签下的所有文本信息,包括其子标签的文本?;

如何使用python';s selenium模块查找标签下的所有文本信息,包括其子标签的文本?;,python,selenium,Python,Selenium,如何查找标签下的所有文本内容 <div class="Header1"> <div class="contentHeader"> <h3 id="select_printer_list_header">Select your printer model</h3> <div id="select_printer_list_info">Parameters are refined by the selected

如何查找标签下的所有文本内容

<div class="Header1">
   <div class="contentHeader">
      <h3 id="select_printer_list_header">Select your printer model</h3>
      <div id="select_printer_list_info">Parameters are refined by the selected printer.</div>
      <div id="select_printer_list">
         <ul>
            <li class="PrinterList TM-J2000" style="display: list-item;">TM-J2000</li>
            <li class="PrinterList TM-J2100" style="display: list-item;">TM-J2100</li>
            <li class="PrinterList TM-L90" style="display: list-item;">TM-L90</li>
            <li class="PrinterList TM-L90_LFC" style="display: list-item;">TM-L90&nbsp;LFC</li>
            <li class="PrinterList TM-m10" style="display: list-item;">TM-m10</li>
            <li class="PrinterList TM-m30" style="display: list-item;">TM-m30</li>
            <li class="PrinterList TM-P20" style="display: list-item;">TM-P20</li>
            <li class="PrinterList TM-P60" style="display: list-item;">TM-P60</li>
            <li class="PrinterList TM-P60II" style="display: list-item;">TM-P60II</li>
            <li class="PrinterList TM-P80" style="display: list-item;">TM-P80</li>
            <li class="PrinterList TM-T20" style="display: list-item;">TM-T20</li>
            <li class="PrinterList TM-T20II" style="display: list-item;">TM-T20II</li>
            <li class="PrinterList TM-T20III" style="display: list-item;">TM-T20III</li>
            <li class="PrinterList TM-T20IIIL" style="display: list-item;">TM-T20IIIL</li>
            <li class="PrinterList TM-T20X" style="display: list-item;">TM-T20X</li>
            <li class="PrinterList TM-T70" style="display: list-item;">TM-T70</li>
            <li class="PrinterList TM-T70II" style="display: list-item;">TM-T70II</li>
            <li class="PrinterList TM-T81III" style="display: list-item;">TM-T81III</li>
            <li class="PrinterList TM-T82II" style="display: list-item;">TM-T82II</li>
            <li class="PrinterList TM-T82III" style="display: list-item;">TM-T82III</li>
            <li class="PrinterList TM-T82IIIL" style="display: list-item;">TM-T82IIIL</li>
            <li class="PrinterList TM-T82X" style="display: list-item;">TM-T82X</li>
            <li class="PrinterList TM-T83III" style="display: list-item;">TM-T83III</li>
            <li class="PrinterList TM-T88IV" style="display: list-item;">TM-T88IV</li>
            <li class="PrinterList TM-T88V" style="display: list-item;">TM-T88V</li>
            <li class="PrinterList TM-T88VI" style="display: list-item;">TM-T88VI</li>
            <li class="PrinterList TM-T90" style="display: list-item;">TM-T90</li>
            <li class="PrinterList TM-T100" style="display: list-item;">TM-T100</li>
            <li class="PrinterList TM-U220" style="display: list-item;">TM-U220</li>
            <li class="PrinterList TM-U230" style="display: list-item;">TM-U230</li>
         </ul>
      </div>
      <h1 class="Head-B" id="ht">HT</h1>
      <hr>
   </div>
   <div class="contentHeaderGhost"></div>
   <div class="Header2">
      <h2 class="Head-C">[Name]</h2>
      <div class="indent">
         <div>
            <div>Horizontal tab</div>
         </div>
      </div>
   </div>
   <div class="Header2">
      <h2 class="Head-C">[Format]</h2>
      <div class="indent">
         <div>
            <table class="parameter">
               <tbody>
                  <tr>
                     <td style="text-align:left;">
                        <div>
                           <div>ASCII</div>
                        </div>
                     </td>
                     <td style="">
                        <div>
                           <div>&nbsp;&nbsp;&nbsp;</div>
                        </div>
                     </td>
                     <td style="">
                        <div>
                           <div>HT</div>
                        </div>
                     </td>
                  </tr>
                  <tr>
                     <td style="text-align:left;">
                        <div>
                           <div>Hex</div>
                        </div>
                     </td>
                     <td style=""></td>
                     <td style="">
                        <div>
                           <div>09</div>
                        </div>
                     </td>
                  </tr>
                  <tr>
                     <td style="text-align:left;">
                        <div>
                           <div>Decimal</div>
                        </div>
                     </td>
                     <td style=""></td>
                     <td style="">
                        <div>
                           <div>9</div>
                        </div>
                     </td>
                  </tr>
               </tbody>
            </table>
         </div>
      </div>
   </div>
   <div class="Header2">
      <h2 class="Head-C">[Description]</h2>
      <div class="indent">
         <div>
            <div>Moves the print position to the next horizontal tab position.</div>
         </div>
      </div>
   </div>
   <div class="Header2">
      <h2 class="Head-C">[Notes]</h2>
      <div class="indent">
         <div>
            <ul class="disco">
               <li>
                  <div>This command is ignored unless the next horizontal tab position has been set.</div>
               </li>
               <li>
                  <div>If the next horizontal tab position exceeds the print area, the printer sets the print
                     position to [Print area width + 1].
                  </div>
               </li>
               <li>
                  <div>If this command is processed when the print position is at [Print area width + 1],
                     the printer executes <a href="index.php?content_id=7#glossary.pbuffulpr">Print buffer-full printing</a> of the current line and horizontal tab processing from the beginning of the next
                     line. In this case, in Page mode, the printer does not execute printing, but the print
                     position is moved.
                  </div>
               </li>
               <li>
                  <div>Horizontal tab positions are set by <a href="index.php?content_id=53#esc_cd">ESC D</a>.
                  </div>
               </li>
               <li>
                  <div>The printer will not be in the beginning of the line by executing this command.</div>
               </li>
               <li>
                  <div>When underline mode is turned on, the underline will not be printed under the tab
                     space skipped by this command.
                  </div>
               </li>
            </ul>
         </div>
      </div>
   </div>

选择您的打印机型号
参数由所选打印机细化。
    TM-J2000 TM-J2100 TM-L90 TM-L90 LFC TM-m10 TM-m30 TM-P20 TM-P60 TM-P60II TM-P80 TM-T20 TM-T20II TM-T20III TM-T20IIIL TM-T20X TM-T70 TM-T70II TM-T81III TM-T82II TM-T82III TM-T82IIIL TM-T82X TM-T83III TM-T88IV TM-T88V TM-T88VI TM-T90 TM-T100 TM-U220 TM-U230
HT
[姓名] 水平标签 [格式] ASCII码 HT 十六进制 09 十进制的 9 [说明] 将打印位置移动到下一个水平制表符位置。 [附注]
  • 除非已设置下一个水平选项卡位置,否则将忽略此命令。
  • 如果下一个水平选项卡位置超出打印区域,打印机将设置打印 位置到[打印区域宽度+1]。
  • 如果在打印位置为[打印区域宽度+1]时处理此命令, 打印机从下一行开始执行当前行和水平制表符处理 线路。在这种情况下,在页面模式下,打印机不执行打印,而是执行打印 位置被移动。
  • 水平选项卡位置由设置。
  • 通过执行此命令,打印机将不会位于行首。
  • 启用下划线模式时,将不会在选项卡下打印下划线 此命令跳过了空间。

我使用通过xpath()查找元素。我一次只能找到一个元素,很难找到所有的文本。通过xpath('//div[@class=“pico_body”]”查找元素我无法准确定位元素,如何查找所有文本可能是完成此类任务的最简单方法