Skip to content

Commit ec20f54

Browse files
committed
Improve test flakyness
1 parent 0f47baf commit ec20f54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/PuppeteerSharp/Bidi/BidiPage.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ public override Task EmulateIdleStateAsync(EmulateIdleOverrides idleOverrides =
139139
/// <inheritdoc />
140140
public override async Task<IResponse> ReloadAsync(NavigationOptions options)
141141
{
142-
var waitForNavigationTask = WaitForNavigationAsync(options);
142+
var navOptions = options == null
143+
? new NavigationOptions { IgnoreSameDocumentNavigation = true }
144+
: options with { IgnoreSameDocumentNavigation = true };
145+
var waitForNavigationTask = WaitForNavigationAsync(navOptions);
143146
var navigationTask = BidiMainFrame.BrowsingContext.ReloadAsync();
144147

145148
try

0 commit comments

Comments
 (0)