bump
This commit is contained in:
@@ -35,9 +35,9 @@ web_navigate_cremotemcp:
|
||||
Interact with web elements through various actions.
|
||||
|
||||
**Parameters:**
|
||||
- `action` (required): One of "click", "fill", "submit", "upload"
|
||||
- `action` (required): One of "click", "fill", "submit", "upload", "select"
|
||||
- `selector` (required): CSS selector for the target element
|
||||
- `value` (optional): Value for fill/upload actions
|
||||
- `value` (optional): Value for fill/upload/select actions
|
||||
- `tab` (optional): Specific tab ID to use
|
||||
- `timeout` (optional): Timeout in seconds (default: 5)
|
||||
|
||||
@@ -51,6 +51,11 @@ web_interact_cremotemcp:
|
||||
action: "fill"
|
||||
selector: "input[name='email']"
|
||||
value: "user@example.com"
|
||||
|
||||
web_interact_cremotemcp:
|
||||
action: "select"
|
||||
selector: "#country"
|
||||
value: "United States"
|
||||
```
|
||||
|
||||
### 3. `web_extract_cremotemcp`
|
||||
|
@@ -53,9 +53,9 @@ timeout: 10 # Optional, default 5 seconds
|
||||
|
||||
### web_interact_cremotemcp
|
||||
```yaml
|
||||
action: "click" # Required: click|fill|submit|upload
|
||||
action: "click" # Required: click|fill|submit|upload|select
|
||||
selector: "button.submit" # Required: CSS selector
|
||||
value: "text to fill" # Required for fill/upload actions
|
||||
value: "text to fill" # Required for fill/upload/select actions
|
||||
timeout: 10 # Optional, default 5 seconds
|
||||
```
|
||||
|
||||
@@ -142,6 +142,14 @@ web_interact_cremotemcp:
|
||||
value: "user@example.com"
|
||||
```
|
||||
|
||||
### Select Dropdown Option
|
||||
```yaml
|
||||
web_interact_cremotemcp:
|
||||
action: "select"
|
||||
selector: "#country"
|
||||
value: "United States" # Can use option text or value
|
||||
```
|
||||
|
||||
### Click Button
|
||||
```yaml
|
||||
web_interact_cremotemcp:
|
||||
|
@@ -63,7 +63,7 @@ Navigate to URLs with optional screenshot capture.
|
||||
```
|
||||
|
||||
#### 2. `web_interact_cremotemcp`
|
||||
Interact with web elements (click, fill, submit, upload).
|
||||
Interact with web elements (click, fill, submit, upload, select).
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -77,6 +77,19 @@ Interact with web elements (click, fill, submit, upload).
|
||||
}
|
||||
```
|
||||
|
||||
For select dropdowns:
|
||||
```json
|
||||
{
|
||||
"name": "web_interact_cremotemcp",
|
||||
"arguments": {
|
||||
"action": "select",
|
||||
"selector": "#country",
|
||||
"value": "United States",
|
||||
"timeout": 5
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 3. `web_extract_cremotemcp`
|
||||
Extract data from pages (source, element HTML, JavaScript execution).
|
||||
|
||||
|
@@ -196,7 +196,7 @@ func main() {
|
||||
"action": map[string]any{
|
||||
"type": "string",
|
||||
"description": "Action to perform",
|
||||
"enum": []any{"click", "fill", "submit", "upload"},
|
||||
"enum": []any{"click", "fill", "submit", "upload", "select"},
|
||||
},
|
||||
"selector": map[string]any{
|
||||
"type": "string",
|
||||
@@ -267,6 +267,13 @@ func main() {
|
||||
err = cremoteServer.client.UploadFile(tab, selector, value, timeout, timeout)
|
||||
message = fmt.Sprintf("Uploaded file %s to element %s", value, selector)
|
||||
|
||||
case "select":
|
||||
if value == "" {
|
||||
return nil, fmt.Errorf("value parameter is required for select action")
|
||||
}
|
||||
err = cremoteServer.client.SelectElement(tab, selector, value, timeout, timeout)
|
||||
message = fmt.Sprintf("Selected option %s in element %s", value, selector)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown action: %s", action)
|
||||
}
|
||||
|
Reference in New Issue
Block a user