简体   繁体   中英

TestStack.White Get all Tabs

is there a way to get all elements of a specific type of a window? In my case, I want to get all tabs of the page to filter it afterwards by which has the greater Y-coord.

This method: Get<TestStack.White.UIItems.TabItems.Tab>(TestStack.White.UIItems.Finders.SearchCriteria.All) only returns the first element it finds.

Thank you and regards, Jan

Using SearchCriteria.ByControlType

IUIItem[] items = window.GetMultiple(SearchCriteria.ByControlType(ControlType.Tab));

Using Linq...

using System.Linq;

...

IUIItem[] items = window.GetMultiple(SearchCriteria.All).OfType<Tab>();

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