Cannot get list of Elements with Page Factory
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Description
@iOSXCUITFindBy(locator) List returns null, while driver.findElements(locator) return list
Environment
- Java client build version or git revision if you use some snapshot: 7.20
- Appium server version or git revision if you use some snapshot: 1.15.1
- Desktop OS/version used to run Appium if necessary: MacOS
- Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 12.10.0
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Real device iOS 11-13
Details

Code To Reproduce Issue [ Good To Have ]
//retun null
@iOSXCUITFindBy(className = "XCUIElementTypeCell")
var ordersList: List< MobileElement>? = null
init {
PageFactory.initElements(AppiumFieldDecorator(driver), this)
}
//return list with 2 elements
fun orders(): List? {
return driver!!.findElements(MobileBy.className("XCUIElementTypeCell"))
}
Exception Stacktraces
Link To Appium Logs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the annotated List case with AppiumFieldDecorator and compare it with driver.findElements using the listed Java client, Appium, and iOS versions. Trace PageFactory.initElements and the @iOSXCUITFindBy handling; done means the annotated list is populated consistently with the direct element lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100