Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 读取DOM并使用selenium为每行创建一个数组数据结构_Java_Arrays_Selenium_Automation - Fatal编程技术网

Java 读取DOM并使用selenium为每行创建一个数组数据结构

Java 读取DOM并使用selenium为每行创建一个数组数据结构,java,arrays,selenium,automation,Java,Arrays,Selenium,Automation,我一直在尝试一项任务,即表包含三行七列,每列包含一个整数,目标是通过Selenium读取tableDOM并提取每行每列的整数值,并且必须创建一个包含所有这些整数的数组。最后,我有三个数组a[],b[],c[],每七个元素一个。如果有人有一个良好的开端来实现这项任务,我们将不胜感激 <tr style="border-bottom: 1px solid rgb(224, 224, 224); color: rgba(0, 0, 0, 0.87); height: 48px;"> &

我一直在尝试一项任务,即表包含三行七列,每列包含一个整数,目标是通过Selenium读取tableDOM并提取每行每列的整数值,并且必须创建一个包含所有这些整数的数组。最后,我有三个数组a[],b[],c[],每七个元素一个。如果有人有一个良好的开端来实现这项任务,我们将不胜感激

<tr style="border-bottom: 1px solid rgb(224, 224, 224); color: rgba(0, 0, 0, 0.87); height: 48px;">
  <td data-test-id="array-item-1-0" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">23</td>
  <td data-test-id="array-item-1-1" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">50</td>
  <td data-test-id="array-item-1-2" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">63</td>
  <td data-test-id="array-item-1-3" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">90</td>
  <td data-test-id="array-item-1-4" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">10</td>
  <td data-test-id="array-item-1-5" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">30</td>
  <td data-test-id="array-item-1-6" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">155</td>
  <td data-test-id="array-item-1-7" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">23</td>
  <td data-test-id="array-item-1-8" style="padding-left: 24px; padding-right: 24px; height: 48px; 
     text-align: left; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: 
     ellipsis; background-color: inherit;">18</td>
</tr>
Maven pom.xml添加以下依赖项:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.4</version>
</dependency>

请出示您的表格HTML代码reference@yong我已经用HTML代码更新了我的问题。谢谢
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.4</version>
</dependency>