diff --git a/apps/report/src/components/sidebar/index.less b/apps/report/src/components/sidebar/index.less
index 85745fbbc1..f76090d419 100644
--- a/apps/report/src/components/sidebar/index.less
+++ b/apps/report/src/components/sidebar/index.less
@@ -285,6 +285,7 @@
// Allow tags to shrink
.cache-tag,
+ .xpath-tag,
.deepthink-tag {
flex-shrink: 0;
white-space: nowrap;
@@ -395,7 +396,7 @@
}
// Light mode Tag styles
-.cache-tag {
+.cache-tag, .xpath-tag {
color: #1890ff;
background-color: #e0f5ff;
}
@@ -558,7 +559,7 @@
}
// Tag styles for dark mode
- .cache-tag {
+ .cache-tag, .xpath-tag {
color: #1890ff !important;
background-color: rgba(24, 144, 255, 0.15) !important;
}
diff --git a/apps/report/src/components/sidebar/index.tsx b/apps/report/src/components/sidebar/index.tsx
index ebbca661d4..79d777b4c2 100644
--- a/apps/report/src/components/sidebar/index.tsx
+++ b/apps/report/src/components/sidebar/index.tsx
@@ -49,6 +49,9 @@ const Sidebar = (props: SidebarProps = {}): JSX.Element => {
setReplayAllMode,
} = props;
const groupedDump = useExecutionDump((store) => store.dump);
+ const playwrightAttributes = useExecutionDump(
+ (store) => store.playwrightAttributes,
+ );
const setActiveTask = useExecutionDump((store) => store.setActiveTask);
const activeTask = useExecutionDump((store) => store.activeTask);
const setHoverTask = useExecutionDump((store) => store.setHoverTask);
@@ -174,6 +177,27 @@ const Sidebar = (props: SidebarProps = {}): JSX.Element => {
) : null;
};
+ const getXPathTag = (task: ExecutionTaskWithSearchAreaUsage) => {
+ if (task.hitBy?.from !== 'User expected path') {
+ return null;
+ }
+
+ return (
+