Closed maheshchaudharCoupa closed 2 years ago
thank you. I'll take a look
What is the automationName?
Could you share code when you call promote_appium_methods
?
https://github.com/appium/ruby_lib/blob/8448f299ad91cf47f69c961da811310cd13d906b/android_tests/lib/run.rb#L28-L30 in this test code worked, so I'd like to check how you called the method.
@KazuCocoa
Thanks for checking the issue, here is the code snippet where we call promote_appium_method
self.driver.start_driver Appium.promote_appium_methods Object
How to create self.driver
? I wonder if this is a global driver ($driver
) thing.
@KazuCocoa we create driver using, and all things are working fine with appium lib version : 10.6.0 appium_driver = Appium::Driver.new({:caps => self.test_configuration.desired_capabilities, :appium_lib => appium_lib}, true)
I think there is change is "hide_keyboard" method signature, it started working after removing a parameter from hide_keyboard call.
def hide_keyboard(close_key = nil) self.wrapped_driver.hide_keyboard(close_key) end
But after that started getting error for :close_app
method `close_app' not defined in #<Object:0x00007f7ce6aee650>
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:211:in `remove_method'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:211:in `block (3 levels) in promote_appium_methods'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:204:in `class_eval'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:204:in `block (2 levels) in promote_appium_methods'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:203:in `each'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:203:in `block in promote_appium_methods'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:202:in `each'
# /Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:202:in `promote_appium_methods'
# /Users/maheshchaudhar/Documents/coupa_systems_automation/lib/coupa_systems_automation/ui/factories/coupa.rb:75:in `start_driver'
thank you, I'll take a look
mm, I could not reproduce this behavior yet.
Did you define the same method name in the Object class?
No we dont have this one let me add and check. Thanks
We had methods with same name which was causing this issue. After removing those, things worked
I have upgraded the appium_lib gem with version 12.0.1 but "promote_appium_methods" is getting failed with below error. Same code works perfectly with appium lib : 11.2.0.
Also, documentation link is not accessible,
NameError: method `hide_keyboard' not defined in #
/Users/maheshchaudhar/.rvm/gems/ruby-2.7.4/gems/appium_lib-12.0.1/lib/appium_lib/appium.rb:211:in `remove_method'