Jan021981
Jan021981

Reputation: 553

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

Upvotes: 1

Views: 918

Answers (1)

Glen Thomas
Glen Thomas

Reputation: 10764

Using SearchCriteria.ByControlType

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

Using Linq...

using System.Linq;

...

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

Upvotes: 1

Related Questions