Skip to content

Commit ec636d9

Browse files
authored
Merge pull request #983 from visagang/features/vguruparan
add wait time for webdriver
2 parents db4dcb5 + d866d63 commit ec636d9

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class ElementActionArgs
3333
/// <summary>
3434
/// Wait time in seconds
3535
/// </summary>
36+
[JsonPropertyName("wait_time")]
3637
public int WaitTime { get; set; }
3738

3839
/// <summary>

src/Plugins/BotSharp.Plugin.WebDriver/UtilFunctions/UtilWebActionOnElementFn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public async Task<bool> Execute(RoleDialogModel message)
3030
}
3131
}
3232

33-
actionArgs.WaitTime = 2;
33+
actionArgs.WaitTime = actionArgs.WaitTime > 0 ? actionArgs.WaitTime : 2;
3434

3535
var conv = _services.GetRequiredService<IConversationService>();
3636

src/Plugins/BotSharp.Plugin.WebDriver/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-web-action_on_element.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,27 @@
1616
"content": {
1717
"type": "string",
1818
"description": "content to input in element"
19-
},
20-
"file_urls": {
19+
},
20+
"file_urls": {
2121
"type": "array",
2222
"description": "The output format must be string array of file urls.",
2323
"items": {
24-
"type": "string",
25-
"description": "file url"
24+
"type": "string",
25+
"description": "file url"
2626
}
27-
},
28-
"show_current_url": {
27+
},
28+
"show_current_url": {
2929
"type": "boolean",
3030
"description": "check if need to extract the current url"
3131
},
32-
"press_key": {
32+
"press_key": {
3333
"type": "string",
3434
"enum": [ "Enter" ],
3535
"description": "press key after input text"
36+
},
37+
"wait_time": {
38+
"type": "number",
39+
"description": "wait time after action in seconds"
3640
}
3741
},
3842
"required": [ "selector", "action" ]

0 commit comments

Comments
 (0)