question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: UIAUTOMATOR2: CHAIN strategy does not work

See original GitHub issue

The problem

Chain strategy does not work when finding elements. Problem does not exists when caps set to:

capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.APPIUM);

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.0-beta, java-client: 5.0.1
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Real phone with Android 6.0

Code To Reproduce Issue [ Good To Have ]

    @HowToUseLocators(androidAutomation = LocatorGroupStrategy.CHAIN)
    @AndroidFindBy(id = "sliding_dashboard")
    @AndroidFindBy(id = "handle_icon")
    private AndroidElement switchAccountIcon;

Link to Appium logs

https://gist.github.com/amedvedjev/2da1468ca7aad98f9b827cd171e80118

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
amedvedjevcommented, Aug 31, 2017
0reactions
lock[bot]commented, Apr 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write automated tests with UI Automator
The UI Automator testing framework is an instrumentation-based API and works with the AndroidJUnitRunner test runner. It's well-suited for ...
Read more >
4. Appium "Locator strategies"
So far we have seen how to connect our real device/Emulators using Appium. In this session we will focus on how to inspect...
Read more >
How To Improve Appium Test Speed and Reliability
What can you do to improve the speed and reliability of your Appium tests? Here's everything you need to know!
Read more >
UIAutomator2 (Android)
The way to start a session using the UiAutomator2 driver is to include the automationName capability in your new session request, with the...
Read more >
How To Identify Locators In Appium [With Examples]
Android-specific locator strategies when the Automation name is ... locator strategies do not work, we can use XPath to find the element.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found