1919
2020import static org .assertj .core .api .AssertionsForClassTypes .assertThat ;
2121import static org .openqa .selenium .testing .Safely .safelyCall ;
22+ import static org .openqa .selenium .testing .drivers .Browser .CHROME ;
23+ import static org .openqa .selenium .testing .drivers .Browser .EDGE ;
24+ import static org .openqa .selenium .testing .drivers .Browser .FIREFOX ;
25+ import static org .openqa .selenium .testing .drivers .Browser .IE ;
26+ import static org .openqa .selenium .testing .drivers .Browser .SAFARI ;
2227
2328import java .util .concurrent .CompletableFuture ;
2429import java .util .concurrent .ExecutionException ;
2530import java .util .concurrent .TimeUnit ;
2631import java .util .concurrent .TimeoutException ;
2732import org .junit .jupiter .api .AfterEach ;
2833import org .junit .jupiter .api .BeforeEach ;
29- import org .junit .jupiter .api .Disabled ;
3034import org .junit .jupiter .api .Test ;
3135import org .openqa .selenium .By ;
3236import org .openqa .selenium .WindowType ;
3337import org .openqa .selenium .bidi .BrowsingContextInspector ;
3438import org .openqa .selenium .environment .webserver .AppServer ;
3539import org .openqa .selenium .environment .webserver .NettyAppServer ;
36- import org .openqa .selenium .firefox .FirefoxDriver ;
37- import org .openqa .selenium .firefox .FirefoxOptions ;
38- import org .openqa .selenium .testing .drivers .Browser ;
40+ import org .openqa .selenium .testing .JupiterTestBase ;
41+ import org .openqa .selenium .testing .NotYetImplemented ;
3942
40- class BrowsingContextInspectorTest {
43+ class BrowsingContextInspectorTest extends JupiterTestBase {
4144
4245 private AppServer server ;
43- private FirefoxDriver driver ;
4446
4547 @ BeforeEach
4648 public void setUp () {
47- FirefoxOptions options = (FirefoxOptions ) Browser .FIREFOX .getCapabilities ();
48- options .setCapability ("webSocketUrl" , true );
49-
50- driver = new FirefoxDriver (options );
51-
5249 server = new NettyAppServer ();
5350 server .start ();
5451 }
5552
5653 @ Test
54+ @ NotYetImplemented (SAFARI )
55+ @ NotYetImplemented (IE )
56+ @ NotYetImplemented (CHROME )
57+ @ NotYetImplemented (EDGE )
5758 void canListenToWindowBrowsingContextCreatedEvent ()
5859 throws ExecutionException , InterruptedException , TimeoutException {
5960 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -74,6 +75,10 @@ void canListenToWindowBrowsingContextCreatedEvent()
7475 }
7576
7677 @ Test
78+ @ NotYetImplemented (SAFARI )
79+ @ NotYetImplemented (IE )
80+ @ NotYetImplemented (CHROME )
81+ @ NotYetImplemented (EDGE )
7782 void canListenToTabBrowsingContextCreatedEvent ()
7883 throws ExecutionException , InterruptedException , TimeoutException {
7984 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -93,6 +98,10 @@ void canListenToTabBrowsingContextCreatedEvent()
9398 }
9499
95100 @ Test
101+ @ NotYetImplemented (SAFARI )
102+ @ NotYetImplemented (IE )
103+ @ NotYetImplemented (CHROME )
104+ @ NotYetImplemented (EDGE )
96105 void canListenToDomContentLoadedEvent ()
97106 throws ExecutionException , InterruptedException , TimeoutException {
98107 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -109,6 +118,10 @@ void canListenToDomContentLoadedEvent()
109118 }
110119
111120 @ Test
121+ @ NotYetImplemented (SAFARI )
122+ @ NotYetImplemented (IE )
123+ @ NotYetImplemented (CHROME )
124+ @ NotYetImplemented (EDGE )
112125 void canListenToBrowsingContextLoadedEvent ()
113126 throws ExecutionException , InterruptedException , TimeoutException {
114127 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -125,7 +138,10 @@ void canListenToBrowsingContextLoadedEvent()
125138 }
126139
127140 @ Test
128- @ Disabled
141+ @ NotYetImplemented (SAFARI )
142+ @ NotYetImplemented (IE )
143+ @ NotYetImplemented (CHROME )
144+ @ NotYetImplemented (EDGE )
129145 void canListenToNavigationStartedEvent ()
130146 throws ExecutionException , InterruptedException , TimeoutException {
131147 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -142,7 +158,10 @@ void canListenToNavigationStartedEvent()
142158 }
143159
144160 @ Test
145- @ Disabled
161+ @ NotYetImplemented (SAFARI )
162+ @ NotYetImplemented (IE )
163+ @ NotYetImplemented (CHROME )
164+ @ NotYetImplemented (EDGE )
146165 void canListenToFragmentNavigatedEvent ()
147166 throws ExecutionException , InterruptedException , TimeoutException {
148167 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -163,7 +182,10 @@ void canListenToFragmentNavigatedEvent()
163182 }
164183
165184 @ Test
166- @ Disabled
185+ @ NotYetImplemented (SAFARI )
186+ @ NotYetImplemented (IE )
187+ @ NotYetImplemented (CHROME )
188+ @ NotYetImplemented (EDGE )
167189 void canListenToUserPromptOpenedEvent ()
168190 throws ExecutionException , InterruptedException , TimeoutException {
169191 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
@@ -183,7 +205,10 @@ void canListenToUserPromptOpenedEvent()
183205 }
184206
185207 @ Test
186- @ Disabled
208+ @ NotYetImplemented (SAFARI )
209+ @ NotYetImplemented (IE )
210+ @ NotYetImplemented (CHROME )
211+ @ NotYetImplemented (EDGE )
187212 void canListenToUserPromptClosedEvent ()
188213 throws ExecutionException , InterruptedException , TimeoutException {
189214 try (BrowsingContextInspector inspector = new BrowsingContextInspector (driver )) {
0 commit comments