Merge pull request #983 from visagang/features/vguruparan

add wait time for webdriver
This commit is contained in:
Haiping 2025-04-01 21:04:17 -05:00 committed by GitHub
commit ec636d987a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 8 deletions

View file

@ -33,6 +33,7 @@ public class ElementActionArgs
/// <summary>
/// Wait time in seconds
/// </summary>
[JsonPropertyName("wait_time")]
public int WaitTime { get; set; }
/// <summary>

View file

@ -30,7 +30,7 @@ public class UtilWebActionOnElementFn : IFunctionCallback
}
}
actionArgs.WaitTime = 2;
actionArgs.WaitTime = actionArgs.WaitTime > 0 ? actionArgs.WaitTime : 2;
var conv = _services.GetRequiredService<IConversationService>();

View file

@ -16,23 +16,27 @@
"content": {
"type": "string",
"description": "content to input in element"
},
"file_urls": {
},
"file_urls": {
"type": "array",
"description": "The output format must be string array of file urls.",
"items": {
"type": "string",
"description": "file url"
"type": "string",
"description": "file url"
}
},
"show_current_url": {
},
"show_current_url": {
"type": "boolean",
"description": "check if need to extract the current url"
},
"press_key": {
"press_key": {
"type": "string",
"enum": [ "Enter" ],
"description": "press key after input text"
},
"wait_time": {
"type": "number",
"description": "wait time after action in seconds"
}
},
"required": [ "selector", "action" ]