简体   繁体   中英

Xamarin.UITest retrieve all element at view

I have couple of EditText inputs at view. But a few of them is hidden under screen and need to scroll to see them. How can I get all EditText elements in my view (also this hidden under screen). I tried:

_app.Query(q => a.All().Class(EditText));

But returns much more elements than is visible (return 96 should be 12) What is the proper query?

Using the All() method changes the search query to return all the elements instead of just the visible ones.

The query to return just the visible elements with the EditText class would be as follows:

_app.Query(x => x.Class("EditText"));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM