[py] drive WebKitGTK/WPE drivers from conftest and deprecate the shipped modules#17649
[py] drive WebKitGTK/WPE drivers from conftest and deprecate the shipped modules#17649titusfortner wants to merge 3 commits into
Conversation
Review Summary by QodoDeprecate WebKitGTK/WPE driver modules and move logic to conftest
WalkthroughsDescription• Deprecate WebKitGTK/WPE public driver classes with warnings • Move WebKit driver logic from deprecated modules to conftest.py • Remove all WebKit Bazel test targets and unit tests • Create isolated WebKit driver implementation in test harness Diagramflowchart LR
A["WebKitGTK/WPE<br/>Public Modules"] -->|deprecated| B["Deprecation<br/>Warnings"]
C["conftest.py"] -->|new| D["WebKitDriver<br/>Implementation"]
D -->|uses| E["_WebKitService<br/>_WebKitLocalDriver"]
F["Bazel Tests<br/>WebKit Targets"] -->|removed| G["Test Cleanup"]
H["Unit Tests<br/>Options/Service"] -->|removed| I["Test Cleanup"]
File Changes1. py/conftest.py
|
Code Review by Qodo
1.
|
What about regular users that want to drive WebKitGTK or WPEWebKit? We won't support that anymore? |
If these users exist we should add support to Selenium Manager and classes in the other bindings. I believe the only reason we have this is for WebKit team. Agents didn't see any real-world usage of these classes in the wild. |
|
Code review by qodo was updated up to the latest commit c94e7aa |
|
I'm moving this to draft until we hear back from Igalia team |
|
The original idea was to add support for using selenium with any WebKitGTK and WPEWebKit based browsers, not just for WebKit tests, but for any user. We started with the python API because it's the most commonly used one in linux, with the idea of adding support to other APIs eventually, but it never happened. I understand the situation is not ideal, it's not tested so it can break easily and we don't even know if there are actual users. |
While working with Python bazel test targets I saw we are generating a bunch of targets that aren't being run, so I investigated the usage of these classes.
The real consumer of WebKitGTK / WPE WebKit driver classes is the WebKit project, except they don't use it as part of a library.
WebKit imports the Selenium repo at a specific commit to run Selenium's Python tests referencing the driver(s) in their project.
We don't need to maintain public classes in our library for this purpose, we just need to provide the right test harness to them.
@carlosgcampos & @lauromoura can you verify that this will work for your needs, or if I am missing a use case you require?
Context on how these classes are used:
💥 What does this PR do?
🔧 Implementation Notes
conftest.pyfile🤖 AI assistance
💡 Additional Considerations
When the deprecated classes are removed, delete:
py/selenium/webdriver/webkitgtk/andpy/selenium/webdriver/wpewebkit/:webkitgtk/:wpewebkitpy_librarytargets inpy/BUILD.bazel(and their entries in the:seleniumdeps)selenium/webdriver/__init__.py(_LAZY_IMPORTS,_LAZY_SUBMODULES)selenium/webdriver/__init__.pyi(imports,__all__, submodules)WEBKITGTK/WPEWEBKITinselenium/webdriver/common/desired_capabilities.pydocs/source/api.rstanddocs/source/index.rstDo not remove:
conftest.pyWebKit harness and thedriverstuple (WebKitGTK/WPE stay runnable drivers)xfail_webkitgtk/xfail_wpewebkitmarkers inpyproject.tomland their test usages🔄 Types of changes