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.

tvOS tests cannot find text on screen on the first test run only

See original GitHub issue

The problem

I am running a simple test that searching for a text on the screen, I have found that I am not able to find this text on-screen on the first run of the test after a fresh install of the app, but I am able to find the text on the 2nd, 3rd,… runs of the exact same test.

The way I am searching for this text is in the following ways (python syntax):

  • self.driver.find_element(MobileBy.IOS_PREDICATE, "name == '" + text + "'")
  • self.driver.find_element_by_xpath('//*[contains(@name, "%s")]' % text)
  • self.driver.find_element_by_name(text)

None of them succeeds

I must mention that starting the app manually after a fresh install succeeds.

Environment

  • Appium version (or git revision) that exhibits the issue: tried with 1.16.0 and 1.15.1
  • Last Appium version that did not exhibit the issue (if applicable): not found.
  • Desktop OS/version used to run Appium: Mac Catalina
  • Node.js version (unless using Appium.app|exe): 8.16.0
  • Npm or Yarn package manager: npm
  • Mobile platform/version under test: tvOS
  • Real device or emulator/simulator: Simulator
  • Appium CLI or Appium.app|exe: CLI

Details

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

Link to Appium logs

Logs: https://assets-secure.applicaster.com/qa/zapp_qa/manual/boaz/appium_text_issue.log

Code To Reproduce Issue [ Good To Have ]

  1. Install fresh tvOS app on your Apple TV Simulator using OS 13.3
  2. Launch the test and search for some text on the screen.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
BoazWarshawskycommented, Feb 27, 2020

@mykola-mokhnach @imurchie, can you please help me with that issue? I am really stuck here for a few days 😦 Thanks!

0reactions
BoazWarshawskycommented, Feb 27, 2020

Good idea, something I will check. We can close the ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get UILabel during UI testing | Apple Developer Forums
The text of my UILabel is from user input. When I use .staticTexts I only get the original label text (set in the...
Read more >
How to test your user interface using Xcode - Hacking with Swift
Right now the app doesn't have anywhere to add UI tests, so the first step is to add a new target. Go to...
Read more >
UI Testing Quick Guide - Use Your Loaf
A quick guide to writing user interface tests with Xcode.
Read more >
Automating Apple TV Apps - Alex Ilyenko's Blog
Revealing key points of building successful tvOS test automation. ... Actually I couldn't find any framework for Apple TV apps testing ...
Read more >
SwiftUI by Tutorials, Chapter 4: Testing & Debugging
Tap the M+ button on the preview to see your breakpoint trigger. When it does, the code pauses at the breakpoint on the...
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