Skip to content

Commit 1bbb043

Browse files
feat: add Puppeteer MCP suite (7 assertions, 1 bug found)
7 tools discovered, 7 assertions. 1 bug: puppeteer_navigate crashes with internal error on invalid URLs instead of returning isError. Fix PR submitted (modelcontextprotocol/servers#4051). Server #40.
1 parent 5fcaaeb commit 1bbb043

7 files changed

Lines changed: 81 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: puppeteer_click returns isError for nonexistent selector
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_click
7+
args:
8+
selector: "#nonexistent-element"
9+
expect:
10+
is_error: true
11+
timeout: 15s
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: puppeteer_evaluate runs JavaScript on page
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_evaluate
7+
args:
8+
script: "document.title"
9+
expect:
10+
not_error: true
11+
timeout: 15s
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: puppeteer_fill returns isError for nonexistent selector
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_fill
7+
args:
8+
selector: "#nonexistent-input"
9+
value: "test"
10+
expect:
11+
is_error: true
12+
timeout: 15s
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: puppeteer_hover returns isError for nonexistent selector
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_hover
7+
args:
8+
selector: "#nonexistent-element"
9+
expect:
10+
is_error: true
11+
timeout: 15s
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "BUG: puppeteer_navigate crashes on invalid URL (should return isError)"
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_navigate
7+
args:
8+
url: "not-a-valid-url"
9+
expect:
10+
is_error: true
11+
timeout: 15s
12+
skip: true # Known bug: returns -32603 internal error instead of isError. PR #4051.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: puppeteer_screenshot captures default page
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_screenshot
7+
args:
8+
name: "test-screenshot"
9+
expect:
10+
not_error: true
11+
not_empty: true
12+
timeout: 15s
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: puppeteer_select returns isError for nonexistent selector
2+
server:
3+
command: npx
4+
args: [-y, "@modelcontextprotocol/server-puppeteer"]
5+
assert:
6+
tool: puppeteer_select
7+
args:
8+
selector: "#nonexistent-select"
9+
value: "option1"
10+
expect:
11+
is_error: true
12+
timeout: 15s

0 commit comments

Comments
 (0)