Open AliceCarroll239 opened 4 years ago
I can confirm this behaviour, both in 7.2.0 as well as 7.3.0.
In 7.2.0 the type check of generics is not done at all.
In 7.3.0: In my case the conditional statement in AppiumFieldDecorator fails, as the listType
is a WildCardType
, not a TypeVariable
. In the end, also this Type contains an upper bound.
if ((listType instanceof TypeVariable)
&& Arrays.asList(((TypeVariable<?>) listType).getBounds())
.stream().anyMatch(item -> availableElementClasses.contains(item))) {
return true;
}
Description
@iOSXCUITFindBy(locator) List returns null, while driver.findElements(locator) return list
Environment
Details
Code To Reproduce Issue [ Good To Have ]
//retun null @iOSXCUITFindBy(className = "XCUIElementTypeCell") var ordersList: List< MobileElement>? = null
//return list with 2 elements fun orders(): List? {
return driver!!.findElements(MobileBy.className("XCUIElementTypeCell"))
}
Exception Stacktraces
Link To Appium Logs