Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors attempting to use UiAutomator2 features #941

Open
nimaeskandary opened this issue Jun 17, 2021 · 1 comment
Open

Errors attempting to use UiAutomator2 features #941

nimaeskandary opened this issue Jun 17, 2021 · 1 comment

Comments

@nimaeskandary
Copy link

Hey wondering if anyone can help with using ui automator 2, I tried following https://github.com/calabash/calabash-android/wiki/UIautomator2, but when I use any of the commands I get a run time error that the implementation cannot be found. I tried a few of the recent calabash-android versions

> start_test_server_in_background(with_uiautomator: true)
> perform_action('uiautomator_touch_text', 'Accept')
Traceback (most recent call last):
       13: from ~/.rvm/rubies/ruby-2.6.4/bin/irb:23:in `<main>'
       12: from ~/.rvm/rubies/ruby-2.6.4/bin/irb:23:in `load'
       11: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `<top (required)>'
       10: from (irb):4
        9: from (irb):4:in `rescue in irb_binding'
        8: from ~/.rvm/gems/ruby-2.6.4@tvx-mobile-automation/gems/calabash-android-0.9.22/lib/calabash-android/operations.rb:93:in `perform_action'
        7: from ~/.rvm/gems/ruby-2.6.4@tvx-mobile-automation/gems/calabash-android-0.9.22/lib/calabash-android/operations.rb:455:in `perform_action'
        6: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
        5: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/timeout.rb:33:in `catch'
        4: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/timeout.rb:33:in `catch'
        3: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
        2: from ~/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
        1: from ~/.rvm/gems/ruby-2.6.4@tvx-mobile-automation/gems/calabash-android-0.9.22/lib/calabash-android/operations.rb:466:in `block in perform_action'
RuntimeError (Action 'uiautomator_touch_text' unsuccessful: Could not find implementation for: 'uiautomator_touch_text')
@JoeSSS
Copy link
Contributor

JoeSSS commented Aug 12, 2021

hmm, works for me

perform_action('uiautomator_touch_text', 'Alles')
2021-08-12 17:46:45 - Action: uiautomator_touch_text - Params: Alles
2021-08-12 17:46:45 - Result:'{"bonusInformation":[],"message":"","success":true}'
{
    "bonusInformation" => [],
             "message" => "",
             "success" => true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants