Merge branch 'master' of https://github.com/hchen2020/BotSharp
This commit is contained in:
commit
4f840c7940
|
|
@ -8,8 +8,7 @@ public partial class PlaywrightWebDriver
|
|||
{
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.DOMContentLoaded);
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
|
||||
await Task.Delay(300);
|
||||
await Task.Delay(100);
|
||||
|
||||
// Find by text exactly match
|
||||
var elements = _instance.Page.GetByRole(AriaRole.Button, new PageGetByRoleOptions
|
||||
|
|
@ -54,7 +53,9 @@ public partial class PlaywrightWebDriver
|
|||
{
|
||||
await elements.ClickAsync();
|
||||
|
||||
await Task.Delay(300);
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
await Task.Delay(100);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public partial class PlaywrightWebDriver
|
|||
{
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.DOMContentLoaded);
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
await Task.Delay(300);
|
||||
await Task.Delay(100);
|
||||
|
||||
// Retrieve the page raw html and infer the element path
|
||||
var regexExpression = actionParams.Context.MatchRule.ToLower() switch
|
||||
|
|
@ -42,7 +42,7 @@ public partial class PlaywrightWebDriver
|
|||
|
||||
// Triggered ajax
|
||||
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||
await Task.Delay(300);
|
||||
await Task.Delay(100);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue