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.

Able to find an element using Appium desktop but not in Appium CLI

See original GitHub issue

The problem

Able to find an element using Appium desktop but not in Appium CLI

Environment

  • Appium CLI: v1.15.1 Appium Desktop: v1.15.1
  • Last Appium version that did not exhibit the issue (if applicable): Don’t know
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe): MacOS Mojave- 10.14.5
  • Npm: 6.14.4
  • Mobile platform/version under test: iOS 13.3.1
  • Real device or emulator/simulator: Real device-iPhone 8
  • Appium CLI or Appium.app|exe: Both

Details

Trying to click on an overlay element which appears when tap on a group icon. Attached the screenshot. Able to find and click on that element in Appium desktop but not using appium CLI Locator xpath -//XCUIElementTypeButton[@name=“join”]

Link to Appium logs

[Appium Desktop Log] https://gist.github.com/VenkateshPS/bed09a8c26839999aa5b7b6079a9e9d0

[Appium Server console log] https://gist.github.com/VenkateshPS/66d0f2bb502e173867687959ce4edd22

[Driver Page Source Appium] https://gist.github.com/VenkateshPS/f060b67028d8af03a1f0d5dc2a31b74e

[Appium Desktop Page Source] https://gist.github.com/VenkateshPS/1b380ed3dd607868d4603da69db2d55e

Code To Reproduce Issue [ Good To Have ]

Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.

Please git clone https://github.com/appium/appium and from the sample-code directory, use one of your favourite languages and sample apps to reproduce the issue.

In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
KazuCocoacommented, Apr 23, 2020

hm, AppiumDesktop also uses the same Appium CLI internally. So, except for the client and timing, Appium desktop and CLI environment should be the same.

Appium desktop uses https://github.com/admc/wd as a webdriver client. AD calls screenshot and page source command frequently. So, I wondered if some actions affect XCTest internal snapshot process.

0reactions
CharbelAA1commented, Mar 18, 2021

I have same issue with Appium CLI, any idea how to fix this ? Using the appium Desktop, I can find the ID easily, when I use appium CLI getpagesource does not read it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to locate element using appium inspector for iOS ...
i am using the same appium. but i need to inspect element of youtube app. is it possible. also not able to see...
Read more >
Find Elements - Appium
Use the UI Automator API, in particular the UiSelector class to locate elements. In Appium you send the Java code, as a string,...
Read more >
Finding Elements - Appium
With Appium Desktop you can find any element and its locators by either clicking the element on the screenshot image, or locating it...
Read more >
Troubleshooting - Appium
Make sure the app is compiled for the simulator (or real device) as appropriate (e.g., in debug mode for the simulator), or you...
Read more >
Strange behavior finding element - Issues/Bugs
However, i am able to find the element using appium inspector. :worried: So it works using inspector but don't works in my nodejs...
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