Commit 07a094e4 authored by youxiaoji's avatar youxiaoji

* [每次执行提交动作之后清空已保存的数据]

* [滚动轴操作使用dispatchEvent进行点击]
parent 59f7f0e4
......@@ -221,7 +221,7 @@ public class VisitorAppointmentTool {
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[1] + "月")).click();
Locator dayColumn = page.locator(".van-picker-column").nth(2);
Locator targetDay = dayColumn.locator("li").filter(new Locator.FilterOptions().setHasText(values[2] + "日"));
targetDay.click();
targetDay.dispatchEvent("click");
//page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[2] + "日")).click();
// 点击确认
......@@ -250,6 +250,8 @@ public class VisitorAppointmentTool {
log.warn("关闭页面时发生异常: {}", e.getMessage());
}
}
infoCollectorService.clearValue();
// sharedContext.tracing().stop(new Tracing.StopOptions()
// .setPath(Paths.get("trace1.zip")));
}
......
......@@ -34,6 +34,9 @@ public class InfoCollectorService {
log.info("key {} value {}", key, value);
values.put(key, value);
}
public void clearValue() {
values.clear();
}
public void saveDefaultValue(String pageId){
JSONArray jsonArray = infos.get(pageId);
for(int i = 0; i < jsonArray.size(); i++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment