Example #1
0
 /// <summary>
 /// Finds the first element in the screen that matches the id criteria and then click it.
 /// </summary>
 /// <param name="id">Id to find the object</param>
 /// <param name="text">Text to match a specific element</param>
 public static void ById(string id, string text)
 {
     try
     {
         var elements = GetControl.CollectionById(id);
         foreach (var elem in elements)
         {
             if (elem.Text.Contains(text))
             {
                 elem.Click();
             }
         }
     }
     catch (Exception ex)
     {
         Assert.Fail("ClickById threw an exception: " + ex.Message);
     }
 }