Hello,
I'm using new page object design with Widget class. And recently caught some unexpected behaviour.
Let me describe my classes:
publicclassMovies {
@iOSFindBy(uiAutomator = ".tableViews()[0].cells()")
publicList<Movie> items;
}
publicclassMovieextendsWidget {
@iOSFindBy(uiAutomator = ".staticTexts()[0]")
publicIOSElementnameElement;
publicIOSElementgetNameElement() {
returnnameElement;
}
}And these classes I use smth like this:
Moviesmovies = ...
List<Movie> items = movies.items; //items is not nullMovieitem = items.get(0);
IOSElementfieldElement = item.nameElement; // fieldElement is nullIOSElementmethodElement = item.getNameElement(); // methodElement is not null
Why does it work so?
Are there any ways to get element directly from field without creating getter?
Hello,
I'm using new page object design with Widget class. And recently caught some unexpected behaviour.
Let me describe my classes:
And these classes I use smth like this:
Why does it work so?
Are there any ways to get element directly from field without creating getter?