11using System ;
2- using System . Collections . Generic ;
32using System . Threading . Tasks ;
43using OpenQA . Selenium . BiDi . Communication ;
54using OpenQA . Selenium . BiDi . Communication . Transport ;
65
6+ #nullable enable
7+
78namespace OpenQA . Selenium . BiDi ;
89
910public class BiDi : IAsyncDisposable
@@ -38,11 +39,11 @@ internal BiDi(string url)
3839 }
3940
4041 internal Modules . Session . SessionModule SessionModule => _sessionModule . Value ;
41- internal Modules . BrowsingContext . BrowsingContextModule BrowsingContextModule => _browsingContextModule . Value ;
42+ internal Modules . BrowsingContext . BrowsingContextModule BrowsingContext => _browsingContextModule . Value ;
4243 public Modules . Browser . BrowserModule Browser => _browserModule . Value ;
4344 public Modules . Network . NetworkModule Network => _networkModule . Value ;
4445 internal Modules . Input . InputModule InputModule => _inputModule . Value ;
45- internal Modules . Script . ScriptModule ScriptModule => _scriptModule . Value ;
46+ public Modules . Script . ScriptModule Script => _scriptModule . Value ;
4647 public Modules . Log . LogModule Log => _logModule . Value ;
4748 public Modules . Storage . StorageModule Storage => _storageModule . Value ;
4849
@@ -60,16 +61,6 @@ public static async Task<BiDi> ConnectAsync(string url)
6061 return bidi ;
6162 }
6263
63- public Task < Modules . BrowsingContext . BrowsingContext > CreateContextAsync ( Modules . BrowsingContext . ContextType type , Modules . BrowsingContext . CreateOptions ? options = null )
64- {
65- return BrowsingContextModule . CreateAsync ( type , options ) ;
66- }
67-
68- public Task < IReadOnlyList < Modules . BrowsingContext . BrowsingContextInfo > > GetTreeAsync ( Modules . BrowsingContext . GetTreeOptions ? options = null )
69- {
70- return BrowsingContextModule . GetTreeAsync ( options ) ;
71- }
72-
7364 public Task EndAsync ( Modules . Session . EndOptions ? options = null )
7465 {
7566 return SessionModule . EndAsync ( options ) ;
@@ -81,44 +72,4 @@ public async ValueTask DisposeAsync()
8172
8273 _transport ? . Dispose ( ) ;
8374 }
84-
85- public Task < Subscription > OnContextCreatedAsync ( Func < Modules . BrowsingContext . BrowsingContextInfo , Task > handler , BrowsingContextsSubscriptionOptions ? options = null )
86- {
87- return BrowsingContextModule . OnContextCreatedAsync ( handler , options ) ;
88- }
89-
90- public Task < Subscription > OnContextCreatedAsync ( Action < Modules . BrowsingContext . BrowsingContextInfo > handler , BrowsingContextsSubscriptionOptions ? options = null )
91- {
92- return BrowsingContextModule . OnContextCreatedAsync ( handler , options ) ;
93- }
94-
95- public Task < Subscription > OnContextDestroyedAsync ( Func < Modules . BrowsingContext . BrowsingContextInfo , Task > handler , BrowsingContextsSubscriptionOptions ? options = null )
96- {
97- return BrowsingContextModule . OnContextDestroyedAsync ( handler , options ) ;
98- }
99-
100- public Task < Subscription > OnContextDestroyedAsync ( Action < Modules . BrowsingContext . BrowsingContextInfo > handler , BrowsingContextsSubscriptionOptions ? options = null )
101- {
102- return BrowsingContextModule . OnContextDestroyedAsync ( handler , options ) ;
103- }
104-
105- public Task < Subscription > OnUserPromptOpenedAsync ( Func < Modules . BrowsingContext . UserPromptOpenedEventArgs , Task > handler , BrowsingContextsSubscriptionOptions ? options = null )
106- {
107- return BrowsingContextModule . OnUserPromptOpenedAsync ( handler , options ) ;
108- }
109-
110- public Task < Subscription > OnUserPromptOpenedAsync ( Action < Modules . BrowsingContext . UserPromptOpenedEventArgs > handler , BrowsingContextsSubscriptionOptions ? options = null )
111- {
112- return BrowsingContextModule . OnUserPromptOpenedAsync ( handler , options ) ;
113- }
114-
115- public Task < Subscription > OnUserPromptClosedAsync ( Func < Modules . BrowsingContext . UserPromptClosedEventArgs , Task > handler , BrowsingContextsSubscriptionOptions ? options = null )
116- {
117- return BrowsingContextModule . OnUserPromptClosedAsync ( handler , options ) ;
118- }
119-
120- public Task < Subscription > OnUserPromptClosedAsync ( Action < Modules . BrowsingContext . UserPromptClosedEventArgs > handler , BrowsingContextsSubscriptionOptions ? options = null )
121- {
122- return BrowsingContextModule . OnUserPromptClosedAsync ( handler , options ) ;
123- }
12475}
0 commit comments