playwright-java
playwright-java copied to clipboard
feat(android): Add android connection implementation
Overview
resolves https://github.com/microsoft/playwright-java/issues/1789
This pull request introduces initial support for connecting to Android devices in the Playwright Java client. It represents the first step in a possible series of contributions intended to bring Android automation capabilities—currently available in the Node.js client—to the Java ecosystem.
Although the related issue was recently marked as not planned, I fully understand and respect the project's priorities. That said, I hope this contribution might be helpful as a starting point should there be interest in revisiting the discussion around Android support in the future.
Changes Made
- Added
Androidinterface and its implementation - Added basic implementation of
AndroidDevice - Made appropriate changes in
ConnectionandPlaywrightto integrate the android flow.
Motivation
Bringing Android support to the Java client could help broaden Playwright's reach among teams working with mobile platforms and Java-based test infrastructure. The ability to automate Android devices is already supported in the Node.js client and opens up valuable use cases such as:
- Testing mobile web applications on real or virtual devices
- Interacting with mobile browsers and apps
- Promoting consistency across Playwright’s language bindings
This pull request focuses solely on connection support to ensure changes remain focused, reviewable, and easy to build upon incrementally.
Testing
- Functionality was tested locally on Android emulators and physical Android devices.
Notes
A complete implementation of Android support for the Java client has been developed and tested locally. I’m submitting this first PR with the intention of contributing incrementally and being as respectful as possible of the project’s review process.
I sincerely welcome any feedback, suggestions, or direction on how best to align this work with the project’s goals and standards. Thank you for taking the time to consider this contribution.
@microsoft-github-policy-service agree company="Browserstack"
Hi, Many thanks for this work. Any updates when this will be merged? bedankt
@mxschmitt / @yury-s Hi, many users have been requesting support for the Android Connect method in the Java framework. While we understand that the current support is limited to the Node.js client, we’ve made an open-source contribution to help bring this to Java.
We understand the earlier decision to not prioritize porting Android support to Java, and we’re not pushing for any timeline. However, we thought this contribution might still be helpful to the community given the interest we’ve seen.
Looking forward to your review and feedback! We'll be sure to address all your comments quickly to help get it merged.
Thanks for your interest and for being respectful of the project’s direction. As mentioned in the related issue, we’re currently not planning to support Android in the Java client. While we appreciate the effort, this area is out of scope for Playwright Java at the moment, and we’re not looking to expand it in that direction.
Thanks again for your understanding.