Skip to content

Conversation

@shs96c
Copy link
Member

@shs96c shs96c commented Jan 5, 2026

This change deprecates the existing classes, but delegates the implementations to the copies made in the pagefactory package. This means that a later PR can be made which removes the original classes in support once we're ready.

@selenium-ci selenium-ci added C-java Java Bindings B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes labels Jan 5, 2026
@selenium-ci
Copy link
Member

Thank you, @shs96c for this code suggestion.

The support packages contain example code that many users find helpful, but they do not necessarily represent
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.

After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium
to work, we will likely close the PR.

We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
If you have any questions, please contact us

@@ -0,0 +1,17 @@
load("//java:defs.bzl", "java_library")

java_library(
Copy link
Member Author

Choose a reason for hiding this comment

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

We can make this a java_export to make this its own maven package. When we're ready to remove PageFactory from the main support package, we can then remove this as a dependency of support and we'll be done. At that point, we can extract the whole directory to a separate project, or just keep it around.

@mk868
Copy link
Contributor

mk868 commented Jan 8, 2026

Can we also address this issue #14474 before publishing this change?
The transition to the .pagefactory. package will require some changes in the users' code anyway, so they could adapt their code to the changes related to #14474 .

Motivation: https://openjdk.org/jeps/500

What do you think?

@diemol
Copy link
Member

diemol commented Jan 8, 2026

@mk868, the idea is to move it to a different package when we release Selenium 5 because we aren't going to work more on this code, so we want to move it to a different place so people notice it. We are also considering ways to offer a path that allows people to move out of this pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes C-java Java Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants