Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pangea-Agent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gavin-Group
Pangea-Agent
Commits
59f7f0e4
Commit
59f7f0e4
authored
Dec 26, 2025
by
youxiaoji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* [关闭playwright trace功能]
parent
15bbdfe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
VisitorAppointmentTool.java
...java/pangea/hiagent/tool/impl/VisitorAppointmentTool.java
+11
-8
No files found.
backend/src/main/java/pangea/hiagent/tool/impl/VisitorAppointmentTool.java
View file @
59f7f0e4
...
...
@@ -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")));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment