Skip to content

Commit e5b4671

Browse files
committed
[bazel] Get the bidi tests working on the EngFlow grid
1 parent 8e2b3e1 commit e5b4671

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

java/test/org/openqa/selenium/bidi/BiDiSessionCleanUpTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
import org.openqa.selenium.WindowType;
2727
import org.openqa.selenium.firefox.FirefoxDriver;
2828
import org.openqa.selenium.firefox.FirefoxOptions;
29+
import org.openqa.selenium.testing.drivers.Browser;
2930

3031
class BiDiSessionCleanUpTest {
3132

3233
private FirefoxDriver driver;
3334

3435
@Test
3536
void shouldNotCloseBiDiSessionIfOneWindowIsClosed() {
36-
FirefoxOptions options = new FirefoxOptions();
37+
FirefoxOptions options = (FirefoxOptions) Browser.FIREFOX.getCapabilities();
3738
// Enable BiDi
3839
options.setCapability("webSocketUrl", true);
3940

@@ -61,7 +62,7 @@ void shouldNotCloseBiDiSessionIfOneWindowIsClosed() {
6162

6263
@Test
6364
void shouldCloseBiDiSessionIfLastWindowIsClosed() {
64-
FirefoxOptions options = new FirefoxOptions();
65+
FirefoxOptions options = (FirefoxOptions) Browser.FIREFOX.getCapabilities();
6566
// Enable BiDi
6667
options.setCapability("webSocketUrl", true);
6768

java/test/org/openqa/selenium/bidi/BiDiSessionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
import org.junit.jupiter.api.Test;
2525
import org.openqa.selenium.firefox.FirefoxDriver;
2626
import org.openqa.selenium.firefox.FirefoxOptions;
27+
import org.openqa.selenium.testing.drivers.Browser;
2728

2829
class BiDiSessionTest {
2930

3031
private FirefoxDriver driver;
3132

3233
@Test
3334
void shouldBeAbleToCreateABiDiSession() {
34-
FirefoxOptions options = new FirefoxOptions();
35+
FirefoxOptions options = (FirefoxOptions) Browser.FIREFOX.getCapabilities();
3536
// Enable BiDi
3637
options.setCapability("webSocketUrl", true);
3738

java/test/org/openqa/selenium/bidi/BiDiTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.openqa.selenium.environment.webserver.NettyAppServer;
3737
import org.openqa.selenium.firefox.FirefoxDriver;
3838
import org.openqa.selenium.firefox.FirefoxOptions;
39+
import org.openqa.selenium.testing.drivers.Browser;
3940

4041
class BiDiTest {
4142

@@ -45,7 +46,7 @@ class BiDiTest {
4546

4647
@BeforeEach
4748
public void setUp() {
48-
FirefoxOptions options = new FirefoxOptions();
49+
FirefoxOptions options = (FirefoxOptions) Browser.FIREFOX.getCapabilities();
4950
options.setCapability("webSocketUrl", true);
5051

5152
driver = new FirefoxDriver(options);

0 commit comments

Comments
 (0)