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.

Appium 1.20: Selecting by Locator Strategy ID fails, specifying resource-id without package name

See original GitHub issue

The problem

After updating to Appium 1.20, we faced an issue on Android, that locators with ID strategy don’t work anymore, returning next error:

[elements("id","logo")] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Cannot rewrite element locator 'logo' to its complete form, because the current application package name is unknown. Consider providing the app package name or changing the locator to '<package_name>:id/logo' format.

At the same time, having our app active, we can successfully get current package name, so it’s being resolved without problems.

Also, locator strategy works fine if specifying ID in complete form

We have lot of locators which use ID strategy and not specifying them in complete form, as we need to support tests for different package names.

Environment

  • Appium version (or git revision) that exhibits the issue: Appium 1.20
  • Last Appium version that did not exhibit the issue (if applicable): Appium 1.19.1
  • Desktop OS/version used to run Appium: Mac OS X | 10.15.7 | 19H114
  • Node.js version (unless using Appium.app|exe): v14.12.0
  • Npm or Yarn package manager: NPM 6.14.8
  • Mobile platform/version under test: Android 10 API 29
  • Real device or emulator/simulator: Samsung Galaxy S10e
  • Appium CLI or Appium.app|exe: Appium.app

Details

If necessary, describe the problem you have been experiencing in more detail.

Link to Appium logs

Appium log with error Full Appium log

Code To Reproduce Issue [ Good To Have ]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
mykola-mokhnachcommented, Jan 15, 2021

Appium 1.20.1 containing the patch has been released

2reactions
mykola-mokhnachcommented, Jan 12, 2021

Published the fix to appium@beta. Thanks for testing it

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to locate element if all attributes are same - Support
I have to enter user name and password but all the attributes are are same (index,class,package). I have tried int s = driver....
Read more >
Appium Tutorial Step by Step Appium Automation
Appium Tutorial is ready for all testers! This is a Complete Tutorial for Appium Mobile Test Automation with examples step by step!
Read more >
appium/CHANGELOG.md - UNPKG
102, * Touch ID enrollment on simulators in Xcode 9 does not work because of an ... 156, * Fix error where package...
Read more >
appium | Yarn - Package Manager
Appium is an open-source, cross-platform test automation tool for native, hybrid, and mobile web and desktop ... CHANGES IN VERSION 1.21.0 (FROM 1.20.2)....
Read more >
Source - GitHub
iOS(XCUITest) - Fix failing screenshot issue in Xcode 13.3 and iOS 15.4 ... Appium 1.20.1 is a patch release ### Android(UIAutomator2) * Fix...
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