diff --git a/src/ElectronNET.API/API/WebContents.cs b/src/ElectronNET.API/API/WebContents.cs
index 2b3086a..413893e 100644
--- a/src/ElectronNET.API/API/WebContents.cs
+++ b/src/ElectronNET.API/API/WebContents.cs
@@ -388,7 +388,7 @@ public class WebContents : ApiBase
/// Returns string - The user agent for this web page.
///
///
- public Task GetUserAgentAsync() => InvokeAsync();
+ public Task GetUserAgentAsync() => InvokeAsyncWithTimeout(3000);
///
/// Overrides the user agent for this web page.
diff --git a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs
index fcbfade..0bb159c 100644
--- a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs
+++ b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs
@@ -178,8 +178,12 @@ namespace ElectronNET.IntegrationTests.Tests
{
////Skip.If(Environment.GetEnvironmentVariable("GITHUB_RUN_ID") != null && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Skipping test on Windows CI.");
- fx.MainWindow.WebContents.SetUserAgent("MyUserAgent/1.0");
await Task.Delay(1000);
+
+ fx.MainWindow.WebContents.SetUserAgent("MyUserAgent/1.0");
+
+ await Task.Delay(1000);
+
var ok = await fx.MainWindow.WebContents.GetUserAgentAsync();
ok.Should().Be("MyUserAgent/1.0");
}