From 81944147c652ded7f36c75dad0274faa9e37f411 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 13:04:06 +0000 Subject: [PATCH 1/2] Initial plan From 49ebce8cb931d456869d512a3476fea6f5bfc001 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 13:09:22 +0000 Subject: [PATCH 2/2] Enhance webpage-snapshot command with explicit wait tool and clearer instructions Co-authored-by: dofaromg <217537952+dofaromg@users.noreply.github.com> --- .../commands/webpage-snapshot.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/webpage-snapshot/commands/webpage-snapshot.md b/plugins/webpage-snapshot/commands/webpage-snapshot.md index 1c4bbef70f..c741526e3d 100644 --- a/plugins/webpage-snapshot/commands/webpage-snapshot.md +++ b/plugins/webpage-snapshot/commands/webpage-snapshot.md @@ -1,5 +1,5 @@ --- -allowed-tools: playwright-browser_navigate, playwright-browser_take_screenshot, playwright-browser_snapshot, playwright-browser_close +allowed-tools: playwright-browser_navigate, playwright-browser_wait_for, playwright-browser_take_screenshot, playwright-browser_snapshot, playwright-browser_close description: Capture a screenshot of a webpage --- @@ -10,14 +10,15 @@ Capture a screenshot of the specified webpage URL. ## Steps 1. Navigate to the URL provided by the user -2. Wait for the page to load completely -3. Take a screenshot of the page -4. Save the screenshot with an appropriate filename -5. Close the browser when done +2. Wait for the page to load completely using `playwright-browser_wait_for` (wait at least 2-3 seconds after navigation) +3. Take a screenshot of the page using `playwright-browser_take_screenshot` +4. Save the screenshot with an appropriate filename (e.g., including domain and timestamp) +5. Close the browser when done using `playwright-browser_close` ## Important notes -- Always wait for the page to fully load before taking a screenshot -- Use a descriptive filename for the screenshot -- Handle any errors gracefully and inform the user -- Close the browser after capturing the screenshot +- Always wait for the page to fully load before taking a screenshot to ensure all content is rendered +- Use a descriptive filename for the screenshot that includes the domain name and timestamp +- Handle any errors gracefully and inform the user of any issues +- Always close the browser after capturing the screenshot to free up resources +- If the page fails to load, provide a clear error message to the user