add wait time for webdriver
This commit is contained in:
parent
8c93870c95
commit
d866d63cae
|
|
@ -33,6 +33,7 @@ public class ElementActionArgs
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wait time in seconds
|
/// Wait time in seconds
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonPropertyName("wait_time")]
|
||||||
public int WaitTime { get; set; }
|
public int WaitTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class UtilWebActionOnElementFn : IFunctionCallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
actionArgs.WaitTime = 2;
|
actionArgs.WaitTime = actionArgs.WaitTime > 0 ? actionArgs.WaitTime : 2;
|
||||||
|
|
||||||
var conv = _services.GetRequiredService<IConversationService>();
|
var conv = _services.GetRequiredService<IConversationService>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,23 +16,27 @@
|
||||||
"content": {
|
"content": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "content to input in element"
|
"description": "content to input in element"
|
||||||
},
|
},
|
||||||
"file_urls": {
|
"file_urls": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "The output format must be string array of file urls.",
|
"description": "The output format must be string array of file urls.",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "file url"
|
"description": "file url"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"show_current_url": {
|
"show_current_url": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "check if need to extract the current url"
|
"description": "check if need to extract the current url"
|
||||||
},
|
},
|
||||||
"press_key": {
|
"press_key": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [ "Enter" ],
|
"enum": [ "Enter" ],
|
||||||
"description": "press key after input text"
|
"description": "press key after input text"
|
||||||
|
},
|
||||||
|
"wait_time": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "wait time after action in seconds"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [ "selector", "action" ]
|
"required": [ "selector", "action" ]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue