Repository navigation
fix: support non-global drivers in get_android_inspect and px_to_window_rel and preserve kwargs in promote_appium_methods - #1143
Open
hoanle0126 wants to merge 1 commit into
Conversation
…ow_rel and preserve kwargs in promote_appium_methods
hoanle0126
force-pushed
the
fix/non-global-driver-helpers
branch
from
October 28, 2026 10:08
647a264 to
deaace1
Compare
This branch has not been deployed
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
When
Appium::Driveris initialized with the defaultglobal_driver = false($driverisnil):get_android_inspect(andpage) previously instantiatedAndroidElements.newwithout passing the current driver instance, causingAndroidElements#start_elementto callnil.lazy_load_stringswhen Nokogiri's SAX parser invokedstart_element(name, attrs). This change passesselftoAndroidElements.new(self)and falls back to{}ifdriverisnil.px_to_window_relpreviously required'ostruct'to already be loaded by the caller and defaulteddriverto$driver(nil). This change requires'ostruct'inAppium::Commonand defaultsdriverto$driver || self.Appium.promote_appium_methodsnow forwards*args, **kwargs, &blockdirectly (matchingpromote_singleton_appium_methods), avoiding aTypeErrorwhen passing a string-keyed positional hash to a promoted instance method.How Has This Been Tested?
bundle exec ruby -Ilib -Itest test/regression_test.rbbundle exec rubocopChecklist
bundle exec rake rubocop