We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f56c7ba commit a25a4cbCopy full SHA for a25a4cb
.changeset/healthy-walls-refuse.md
@@ -0,0 +1,5 @@
1
+---
2
+"@browserbasehq/stagehand": patch
3
4
+
5
+accept xpaths with 'xpath=' prepended to the front in addition to xpaths without
lib/handlers/extractHandler.ts
@@ -184,7 +184,7 @@ export class StagehandExtractHandler {
184
await this.stagehandPage._waitForSettledDom(domSettleTimeoutMs);
185
await this.stagehandPage.startDomDebug();
186
187
- const targetXpath = selector;
+ const targetXpath = selector?.replace(/^xpath=/, "") ?? "";
188
189
// **2:** Store the original DOM before any mutations
190
// we need to store the original DOM here because calling createTextBoundingBoxes()
0 commit comments