Commit 59f7f0e4 authored by youxiaoji's avatar youxiaoji

* [关闭playwright trace功能]

parent 15bbdfe6
......@@ -143,10 +143,10 @@ public class VisitorAppointmentTool {
@Tool(description = "提交访客预约申请")
public String submitAppointmentApply(ToolContext toolContext) {
sharedContext.tracing().start(new Tracing.StartOptions()
.setScreenshots(true)
.setSnapshots(true)
.setSources(true));
// sharedContext.tracing().start(new Tracing.StartOptions()
// .setScreenshots(true)
// .setSnapshots(true)
// .setSources(true));
log.info("submit apply info ");
JSONArray jsonArray = infoCollectorService.getInfo(pageId);
long startTime = System.currentTimeMillis();
......@@ -219,13 +219,16 @@ public class VisitorAppointmentTool {
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[0] + "年")).click();
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[1] + "月")).click();
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[2] + "日")).click();
Locator dayColumn = page.locator(".van-picker-column").nth(2);
Locator targetDay = dayColumn.locator("li").filter(new Locator.FilterOptions().setHasText(values[2] + "日"));
targetDay.click();
//page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName(values[2] + "日")).click();
// 点击确认
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("确认")).click();
page.locator(".van-overlay").first().waitFor(new Locator.WaitForOptions().setState(WaitForSelectorState.HIDDEN));
}
saveScreenShot(page.screenshot(), "ipark");
// saveScreenShot(page.screenshot(), "ipark");
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("提交"))
.click();
page.waitForTimeout(3000);
......@@ -247,8 +250,8 @@ public class VisitorAppointmentTool {
log.warn("关闭页面时发生异常: {}", e.getMessage());
}
}
sharedContext.tracing().stop(new Tracing.StopOptions()
.setPath(Paths.get("trace1.zip")));
// sharedContext.tracing().stop(new Tracing.StopOptions()
// .setPath(Paths.get("trace1.zip")));
}
}
......
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