diff --git a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs index cb57fc97b449b..542791604be11 100644 --- a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs +++ b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs @@ -154,6 +154,11 @@ public Task OnDomContentLoadedAsync(Func han return BiDi.BrowsingContext.OnDomContentLoadedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); } + public Task OnDomContentLoadedAsync(Action handler, SubscriptionOptions? options = null) + { + return BiDi.BrowsingContext.OnDomContentLoadedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); + } + public Task OnLoadAsync(Action handler, SubscriptionOptions? options = null) { return BiDi.BrowsingContext.OnLoadAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); @@ -194,9 +199,14 @@ public Task OnNavigationFailedAsync(Func han return BiDi.BrowsingContext.OnNavigationFailedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); } - public Task OnDomContentLoadedAsync(Action handler, SubscriptionOptions? options = null) + public Task OnNavigationCommittedAsync(Action handler, SubscriptionOptions? options = null) { - return BiDi.BrowsingContext.OnDomContentLoadedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); + return BiDi.BrowsingContext.OnNavigationCommittedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); + } + + public Task OnNavigationCommittedAsync(Func handler, SubscriptionOptions? options = null) + { + return BiDi.BrowsingContext.OnNavigationCommittedAsync(handler, new BrowsingContextsSubscriptionOptions(options) { Contexts = [this] }); } public override bool Equals(object? obj) diff --git a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs index f64b5ecf3d7d2..2f4ccc00c5e92 100644 --- a/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs +++ b/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextModule.cs @@ -247,6 +247,16 @@ public async Task OnNavigationFailedAsync(Action h return await Broker.SubscribeAsync("browsingContext.navigationFailed", handler, options).ConfigureAwait(false); } + public async Task OnNavigationCommittedAsync(Func handler, BrowsingContextsSubscriptionOptions? options = null) + { + return await Broker.SubscribeAsync("browsingContext.navigationCommitted", handler, options).ConfigureAwait(false); + } + + public async Task OnNavigationCommittedAsync(Action handler, BrowsingContextsSubscriptionOptions? options = null) + { + return await Broker.SubscribeAsync("browsingContext.navigationCommitted", handler, options).ConfigureAwait(false); + } + public async Task OnContextCreatedAsync(Func handler, BrowsingContextsSubscriptionOptions? options = null) { return await Broker.SubscribeAsync("browsingContext.contextCreated", handler, options).ConfigureAwait(false);