tvOS tests cannot find text on screen on the first test run only
See original GitHub issueThe 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 ]
- Install fresh tvOS app on your Apple TV Simulator using OS 13.3
- Launch the test and search for some text on the screen.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mykola-mokhnach @imurchie, can you please help me with that issue? I am really stuck here for a few days 😦 Thanks!
Good idea, something I will check. We can close the ticket.