Repository navigation
feat: prepare to drop the global var - #1144
Merged
Merged
Conversation
Reset Android navigation between affected tests, restore implicit waits and relaunch after reinstall. Use the current startActivity extension, fix capability expectations and synchronize multitouch actions. Remove applesimutils from the iOS workflow. Validated on Android API 36 with global_driver=true and false: 100 tests and 150 assertions per mode. Unit tests: 43 tests and 100 assertions. RuboCop: 108 files clean.
Use Safari with a local HTML fixture instead of legacy UIWebView. Reset navigation for affected tests, use stable gesture targets, and accept both valid background app states. Allow the iOS HTTP timeout to cover WDA startup and support local Simulator capability overrides. Validated changed iOS classes on iOS 26.5 with a rebuilt ARM UICatalog and CI-matching Appium 3.9.0 / XCUITest 12.22.4: 36 tests and 77 assertions pass in each global-driver mode. Unit tests: 43 tests / 100 assertions. RuboCop: 109 files clean. Full iOS 18.5 suite remains for CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make non-global drivers usable independently while retaining explicit global-driver usage (
Appium::Driver.new(opts, true)) and implicit promotion through$driver. The default remains non-global; this PR does not remove global support.Compatibility notes
Driver.new(opts)now honors symbol/stringglobal_driveroptions when the second argument is omitted or nil. Previously, omitting the second argument ignored the hash option. A hash value of true can therefore replace$driverand quit the previous global session. An explicit true/false second argument takes precedence.start_driverquits only the receiving wrapper's previous session, instead of quitting an unrelated$driversession. Callers relying on that cross-driver cleanup must quit the other driver explicitly.$driver. Pass an explicit driver topx_to_window_relwhen a different session is intended.Validation
Release notes
The override below supplies explicit changelog entries to Release Please. Use squash merge; Release Please does not support this override with plain merge commits.
BEGIN_COMMIT_OVERRIDE
feat: support independent non-global drivers while preserving explicit global-driver usage and the existing non-global default
fix: honor symbol and string global_driver hash options when the constructor's second argument is omitted or nil; true now replaces the global driver and quits its previous session, while an explicit boolean argument takes precedence
fix: make start_driver quit only its own previous session; callers relying on cleanup of another global driver must quit that driver explicitly
fix: use the receiving driver's session for coordinate conversion and Android inspection instead of an unrelated global driver
fix: refresh generated singleton methods on re-promotion so they use the newly supplied driver rather than the previous driver
fix: clear session and app-string cache on quit and reload app strings for replacement sessions
END_COMMIT_OVERRIDE