UIWebViews are not detected as idle when displaying PDFS
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
Per Apple's documentation:
> "UIWebView objects can be used to display other content types, such as Keynote, PDF, and Pages documents. For the best rendering of plain and rich text in your app, however, you should use UITextView instead."
(Supported File Formats, https://developer.apple.com/documentation/uikit/uiwebview)
EarlGrey's current implementation of UIWebViewIdlingResource uses a11y elements in the browser view hierarchy to determine idle state. In PDF and other document types, the browser view is not use. Instead, content is populated inside an internal PDFView property. See: https://github.com/google/EarlGrey/blob/master/EarlGrey/Synchronization/GREYUIWebViewIdlingResource.m#L143
Since EarlGrey waits for content to be rendered inside the browser view, UIWebViews displaying PDFs are never displayed as idle.
Contributor guide
Research direction
Start in EarlGrey/Synchronization/GREYUIWebViewIdlingResource.m around line 143 and review how UIWebViewIdlingResource determines idleness from accessibility elements. Compare that path with UIWebViews displaying PDFs through the internal PDFView property. Done means PDF-displaying UIWebViews can reach the idle state instead of waiting indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100