/// <summary> /// Finds a collection of elements in the screen that matches the UiAutomator criteria using a Child UiSelector. /// </summary> /// <param name="selector"> Represents the Enum in Share class </param> /// <param name="value"> the boolean value of an element to be found </param> /// <param name="text"> text to found the element to be click</param> /// <param name="position"> position of an object on the layout hierarchy </param> public static void CollectionByUiAutomatorChildSelector(Share.Selector selector, bool value, string text, int position = 0) { try { var elements = GetControl.CollectionByUiAutomatorChildSelector(selector, value, position); foreach (var element in elements) { if (element.Text.Contains(text)) { element.Click(); } } } catch (Exception ex) { Assert.Fail("ClickCollectionByUiAutomatorChildSelector threw an exception: " + ex.Message); } }