1

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

Jan021981
  • 521
  • 3
  • 28

1 Answers1

1

Using SearchCriteria.ByControlType

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

Using Linq...

using System.Linq;

...

IUIItem[] items = window.GetMultiple(SearchCriteria.All).OfType<Tab>();
Glen Thomas
  • 10,190
  • 5
  • 33
  • 65