예제 #1
0
        public static void AssertRangeValue(AutomationElement element, double expected)
        {
            RangeValuePattern currentPattern = AutomationPatternHelper.GetRangeValuePattern(element);
            double            num            = currentPattern.Current.Value;

            if (expected != num)
            {
                throw new Exception(string.Format("RangeValue is not as expected. Expected: {0}, Actual: {1}. ({2})", expected, num, element.ToString()));
            }
        }
예제 #2
0
 public static void SetRangeValue(AutomationElement element, double valueToSet)
 {
     AutomationPatternHelper.GetRangeValuePattern(element).SetValue(valueToSet);
 }