bump
This commit is contained in:
@@ -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