Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ dependencies {
### Compatibility Matrix
Appium Java Client | Selenium client
----------------------------------------------------------------------------------------------------|-----------------------------
`next` (not released yet) | `4.36.0`
`10.0.0` | `4.35.0`, `4.36.0`
`next` (not released yet) | `4.40.0`
`10.0.0` | `4.35.0`, `4.36.0`, `4.37.0`, `4.38.0`, `4.39.0`
`9.5.0` | `4.34.0`
`9.4.0` | `4.26.0`, `4.27.0`, `4.28.0`, `4.28.1`, `4.29.0`, `4.30.0`, `4.31.0`, `4.32.0`, `4.33.0`
`9.2.1`(known issues: appium/java-client#2145, appium/java-client#2146), `9.2.2`, `9.2.3`, `9.3.0` | `4.19.0`, `4.19.1`, `4.20.0`, `4.21.0`, `4.22.0`, `4.23.0`, `4.23.1`, `4.24.0`, `4.25.0`, `4.26.0`, `4.27.0`
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
org.gradle.daemon=true

selenium.version=4.36.0
selenium.version=4.40.0
# Please increment the value in a release
appiumClient.version=10.0.0
7 changes: 4 additions & 3 deletions src/main/java/io/appium/java_client/AppiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,15 @@ private void initBiDi(BaseOptions<?> responseCaps) {
}
var executor = getCommandExecutor();
final HttpClient wsClient;
AppiumClientConfig wsConfig;
if (executor instanceof AppiumCommandExecutor) {
var wsConfig = ((AppiumCommandExecutor) executor).getAppiumClientConfig().baseUri(biDiUri);
wsConfig = ((AppiumCommandExecutor) executor).getAppiumClientConfig().baseUri(biDiUri);
wsClient = ((AppiumCommandExecutor) executor).getHttpClientFactory().createClient(wsConfig);
} else {
var wsConfig = AppiumClientConfig.defaultConfig().baseUri(biDiUri);
wsConfig = AppiumClientConfig.defaultConfig().baseUri(biDiUri);
wsClient = HttpClient.Factory.createDefault().createClient(wsConfig);
}
var biDiConnection = new org.openqa.selenium.bidi.Connection(wsClient, biDiUri.toString());
this.biDi = new BiDi(biDiConnection);
this.biDi = new BiDi(biDiConnection, wsConfig.wsTimeout());
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this limit the minimum supported selenium version to 4.40?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
Well, we could restore constructor new BiDi(biDiConnection) in Selenium 4.41.0.
Then we do a switch in Appium:

if <new constructor exists>
  return new BiDi(biDiConnection, timeout)
else
  return new BiDi(biDiConnection)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense just to bump the minimum supported selenium version, otherwise we'll get a lot of complains and confusion. (It's not the first breaking change from Selenium)

PS: I've fixed README

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use reflection to make it backward compatible?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, do you want me to re-work the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but still the release will be needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Well, we could restore constructor new BiDi(biDiConnection) in Selenium 4.41.0. Then we do a switch in Appium:

if
return new BiDi(biDiConnection, timeout)
else
return new BiDi(biDiConnection)

this probably won't work. We'd need to load the class dynamically via Class.forName and also use an interface to access its methods, which will be a pain

I agree to @valfirst , it's not the first time we deal with such issues, yolo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not the first breaking change from Selenium

I don't know about other cases, but this specific was done occasionally. Sorry for that. :(

Don't you want to run Appium build against the night Selenium build (4.41.0-SNAPSHOT)?
In Selenide, we do the following:

  1. Every PR and main branch is built against latest stable Selenium (4.40.0)
  2. Additionally, every night we run a build from main branch against latest Selenium nightly build (4.41.0-SNAPSHOT)

It helps to detect backward incompatible changes on an early stage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented in #2384

}
}