Exemplo n.º 1
0
 public static void VerifyCurrentSize(string expectedSize)
 {
     try
     {
         string currentSize = GridSize.GetInternalElement().FindElementById("text1").Text;
         Assert.AreEqual(expectedSize, currentSize,
                         "Current plate grid size: " + GridSize + " not equal to expected: " + expectedSize);
         ConsoleMessage.Pass(String.Format("{0}. Verify plate size, expected size: {1}",
                                           ActivityName, expectedSize));
     }
     catch (Exception ex)
     {
         ConsoleMessage.Fail(String.Format("{0}. Can't verify plate szie, expected size: {1}",
                                           ActivityName, expectedSize), ex);
         throw;
     }
 }
Exemplo n.º 2
0
 public static void ChangeSize(string size)
 {
     try
     {
         GridSize.GetInternalElement().Click();
         Appium.Instance.Driver.FindElementByAndroidUIAutomator(
             "new UiSelector().resourceId(\"android:id/text1\").className(\"android.widget.CheckedTextView\")" +
             ".text(\"" + size + "\")").Click();
         ConsoleMessage.Pass(String.Format("{0}. Change plate size to: {1}",
                                           ActivityName, size));
     }
     catch (Exception ex)
     {
         ConsoleMessage.Fail(String.Format("{0}. Can't change plate size to: {1}",
                                           ActivityName, size), ex);
         throw;
     }
 }