From 5feb22981aeb0870c68e09d9f7c6fcdcf363ff42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BD=AD=E5=AE=87=E7=90=A6?= <465645774@qq.com>
Date: Sat, 6 Feb 2021 19:42:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dxml=E5=BD=A2=E5=BC=8F?=
=?UTF-8?q?=E8=AF=BB=E5=8F=96=E7=AA=97=E4=BD=93=E5=85=83=E7=B4=A0=E6=97=B6?=
=?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 8 +--
.../selenium/location/XmlLocation.java | 51 ++++++++++---------
2 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7aff44d..8a9ad31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,13 +55,7 @@
3.17
-
-
+
org.dom4j
dom4j
diff --git a/src/main/java/com/auxiliary/selenium/location/XmlLocation.java b/src/main/java/com/auxiliary/selenium/location/XmlLocation.java
index be4e3d9..b16935f 100644
--- a/src/main/java/com/auxiliary/selenium/location/XmlLocation.java
+++ b/src/main/java/com/auxiliary/selenium/location/XmlLocation.java
@@ -59,7 +59,7 @@ public class XmlLocation extends AbstractLocation {
try {
dom = new SAXReader().read(xmlFile);
} catch (DocumentException e) {
- throw new IncorrectFileException("xml文件异常,文件位置:" + xmlFile.getAbsolutePath());
+ throw new IncorrectFileException("xml文件异常,文件位置:" + xmlFile.getAbsolutePath(), e);
}
}
@@ -76,12 +76,9 @@ public class XmlLocation extends AbstractLocation {
public ArrayList findElementByTypeList(String name) {
ArrayList byTypeList = new ArrayList();
//查询并存储元素下的子元素
- @SuppressWarnings("unchecked")
- ArrayList