Update default timeout to lowercasing
This commit is contained in:
parent
e570672a36
commit
47d728b68a
|
|
@ -5,5 +5,5 @@ public class WebBrowsingSettings
|
|||
public string Driver { get; set; } = "Playwright";
|
||||
public bool Headless { get; set; }
|
||||
// Default timeout in milliseconds
|
||||
public float DefaultTimeOut { get; set; } = 30000;
|
||||
public float DefaultTimeout { get; set; } = 30000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class GoToPageFn : IFunctionCallback
|
|||
}, new PageActionArgs
|
||||
{
|
||||
Url = url,
|
||||
Timeout = _webDriver.DefaultTimeOut
|
||||
Timeout = _webDriver.DefaultTimeout
|
||||
});
|
||||
message.Content = result.IsSuccess ? $"Page {url} is open." : $"Page {url} open failed. {result.Message}";
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class OpenBrowserFn : IFunctionCallback
|
|||
result = await _browser.GoToPage(msgInfo, new PageActionArgs
|
||||
{
|
||||
Url = url,
|
||||
Timeout = _webDriver.DefaultTimeOut
|
||||
Timeout = _webDriver.DefaultTimeout
|
||||
});
|
||||
|
||||
if (result.IsSuccess)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class UtilWebGoToPageFn : IFunctionCallback
|
|||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||
});
|
||||
var _webDriver = _services.GetRequiredService<WebBrowsingSettings>();
|
||||
args.Timeout = _webDriver.DefaultTimeOut;
|
||||
args.Timeout = _webDriver.DefaultTimeout;
|
||||
args.WaitForNetworkIdle = false;
|
||||
args.WaitTime = 5;
|
||||
args.OpenNewTab = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue