提交 54c121a8 authored 作者: 孙洁清's avatar 孙洁清

Merge branch 'master' of git.yfzx.zjtys.com.cn:hct/auto-test

...@@ -176,6 +176,10 @@ public class SeleniumExecutor { ...@@ -176,6 +176,10 @@ public class SeleniumExecutor {
private void traversal(List<ElementDetail> elementDetails) { private void traversal(List<ElementDetail> elementDetails) {
for (Attributes attributes : elements.keySet()) { for (Attributes attributes : elements.keySet()) {
WebElement element = elements.get(attributes); WebElement element = elements.get(attributes);
if (ExpectedConditions.stalenessOf(element).apply(driver)) {
reload();
element = elements.get(attributes);
}
if (!currentHistoryAttributes.contains(attributes) && isInputAble(element)) { if (!currentHistoryAttributes.contains(attributes) && isInputAble(element)) {
ActResult act = act(attributes, element, INPUT); ActResult act = act(attributes, element, INPUT);
ElementDetail elementDetail = act.getElementDetail(); ElementDetail elementDetail = act.getElementDetail();
...@@ -187,6 +191,10 @@ public class SeleniumExecutor { ...@@ -187,6 +191,10 @@ public class SeleniumExecutor {
} }
for (Attributes attributes : elements.keySet()) { for (Attributes attributes : elements.keySet()) {
WebElement element = elements.get(attributes); WebElement element = elements.get(attributes);
if (ExpectedConditions.stalenessOf(element).apply(driver)) {
reload();
element = elements.get(attributes);
}
if (!currentHistoryAttributes.contains(attributes) && isClickAble(element)) { if (!currentHistoryAttributes.contains(attributes) && isClickAble(element)) {
ActResult act = act(attributes, element, CLICK); ActResult act = act(attributes, element, CLICK);
ElementDetail elementDetail = act.getElementDetail(); ElementDetail elementDetail = act.getElementDetail();
...@@ -469,6 +477,7 @@ public class SeleniumExecutor { ...@@ -469,6 +477,7 @@ public class SeleniumExecutor {
String fileNotFound = "Failed to load resource: net::ERR_FILE_NOT_FOUND"; String fileNotFound = "Failed to load resource: net::ERR_FILE_NOT_FOUND";
String errorConnection = "Failed to load resource: net::ERR_CONNECTION_RESET"; String errorConnection = "Failed to load resource: net::ERR_CONNECTION_RESET";
String resourceFailure = "Failed to load resource: "; String resourceFailure = "Failed to load resource: ";
String referenceError = "Uncaught ReferenceError: ";
if (logEntry.getMessage().contains(typeError)) { if (logEntry.getMessage().contains(typeError)) {
return "JS类型错误"; return "JS类型错误";
} else if (logEntry.getMessage().contains(fileNotFound)) { } else if (logEntry.getMessage().contains(fileNotFound)) {
...@@ -477,6 +486,8 @@ public class SeleniumExecutor { ...@@ -477,6 +486,8 @@ public class SeleniumExecutor {
return "数据请求错误"; return "数据请求错误";
} else if (logEntry.getMessage().contains(resourceFailure)) { } else if (logEntry.getMessage().contains(resourceFailure)) {
return "加载依赖错误"; return "加载依赖错误";
} else if (logEntry.getMessage().contains(referenceError)) {
return "没有依赖";
} }
return null; return null;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论