feat: respond with action and generated locator (#181)
Closes https://github.com/microsoft/playwright-mcp/issues/163
This commit is contained in:
parent
4d59e06184
commit
4a19e18999
10 changed files with 126 additions and 52 deletions
|
|
@ -34,6 +34,7 @@ const pressKey: ToolFactory = captureSnapshot => ({
|
|||
const validatedParams = pressKeySchema.parse(params);
|
||||
return await context.currentTab().runAndWait(async tab => {
|
||||
await tab.page.keyboard.press(validatedParams.key);
|
||||
return `await page.keyboard.press('${validatedParams.key}');`;
|
||||
}, {
|
||||
status: `Pressed key ${validatedParams.key}`,
|
||||
captureSnapshot,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue