Skip to content

Commit 31e36c4

Browse files
committed
trim prepended 'xpath=' before downstream method helpers
1 parent 47b15ee commit 31e36c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/handlers/actHandler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,10 @@ export class StagehandActHandler {
307307
private async _performPlaywrightMethod(
308308
method: string,
309309
args: unknown[],
310-
xpath: string,
310+
rawXPath: string,
311311
domSettleTimeoutMs?: number,
312312
) {
313+
const xpath = rawXPath.replace(/^xpath=/i, "").trim();
313314
const locator = deepLocator(this.stagehandPage.page, xpath).first();
314315
const initialUrl = this.stagehandPage.page.url();
315316

0 commit comments

Comments
 (0)