Skip to content

Commit 6a82fcf

Browse files
committed
fix: use openAndWait instead of url in navigate tool
1 parent 8322f54 commit 6a82fcf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tools/navigate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const navigateCb: ToolCallback<typeof navigateSchema> = async args => {
1616
const browser = await context.browser.get();
1717

1818
console.error(`Navigating to: ${url}`);
19-
await browser.url(url);
19+
await browser.openAndWait(url);
2020

2121
return await createBrowserStateResponse(browser, {
2222
action: `Successfully navigated to ${url}`,
23-
testplaneCode: `await browser.url("${url}");`,
23+
testplaneCode: `await browser.openAndWait("${url}");`,
2424
});
2525
} catch (error) {
2626
console.error("Error navigating to URL:", error);

test/tools/navigate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe(
4444
expect(content[0].type).toBe("text");
4545
expect(content[0].text).toContain(`Successfully navigated to ${url}`);
4646
expect(content[0].text).toContain("## Testplane Code");
47-
expect(content[0].text).toContain(`await browser.url("${url}");`);
47+
expect(content[0].text).toContain(`await browser.openAndWait("${url}");`);
4848
});
4949

5050
it("should include browser state information in response", async () => {

0 commit comments

Comments
 (0)