Delay more time when click button or element.

This commit is contained in:
Haiping Chen 2024-02-09 17:22:55 -06:00
parent f68b240c6b
commit 421c65ec49
2 changed files with 3 additions and 1 deletions

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(100);
await Task.Delay(300);
// Find by text exactly match
var elements = _instance.Page.GetByRole(AriaRole.Button, new PageGetByRoleOptions

View file

@ -9,6 +9,7 @@ public partial class PlaywrightWebDriver
{
await _instance.Page.WaitForLoadStateAsync(LoadState.DOMContentLoaded);
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Task.Delay(300);
// Retrieve the page raw html and infer the element path
var regexExpression = actionParams.Context.MatchRule.ToLower() switch
@ -42,6 +43,7 @@ public partial class PlaywrightWebDriver
// Triggered ajax
await _instance.Page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Task.Delay(300);
return true;
}