This commit is contained in:
Haiping Chen 2024-02-10 11:36:49 -06:00
commit 4f840c7940
2 changed files with 6 additions and 5 deletions

View file

@ -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)

View file

@ -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;
}