assert_element_count
Check that the number of elements matching a selector equals an expected count, validating page structure during browser automation.
Instructions
Assert number of elements matching selector equals expected count.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>",
"expected_count": "<expected_count>"
},
"name": "assert_element_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | css | |
| selector | Yes | ||
| expected_count | Yes |