Skip to content

Commit

Permalink
[grid] Adding method to know if driver supports BiDi
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Oct 13, 2022
1 parent 73b0d80 commit 07d52d4
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/WebDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public interface WebDriverInfo {
*/
boolean isSupportingCdp();

/**
* @return Whether the driver has enabled the CDP interface.
*/
boolean isSupportingBiDi();

/**
* Often, a {@link WebDriver} instance needs one or more supporting files or executables to be
* present (such as a vendor-provided executable which speaks the WebDriver Protocol). This means
Expand Down
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public boolean isSupportingCdp() {
return true;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
try {
Expand Down
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/edge/EdgeDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public boolean isSupportingCdp() {
return true;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
try {
Expand Down
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/firefox/GeckoDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public boolean isSupportingCdp() {
return true;
}

@Override
public boolean isSupportingBiDi() {
return true;
}

@Override
public boolean isAvailable() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ public boolean isSupportingCdp() {
return detectedDriver.isSupportingCdp();
}

@Override
public boolean isSupportingBiDi() {
return detectedDriver.isSupportingBiDi();
}

@Override
public boolean isAvailable() {
return detectedDriver.isAvailable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public boolean isSupportingCdp() {
return false;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
try {
Expand Down
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/safari/SafariDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public boolean isSupportingCdp() {
return false;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public boolean isSupportingCdp() {
return false;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
try {
Expand Down
5 changes: 5 additions & 0 deletions java/test/org/openqa/selenium/remote/FakeWebDriverInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public boolean isSupportingCdp() {
return true;
}

@Override
public boolean isSupportingBiDi() {
return false;
}

@Override
public boolean isAvailable() {
return true;
Expand Down

0 comments on commit 07d52d4

Please sign in to comment.