Example #1
0
        public AppiumCheckSettings Region(IWebElement targetElement)
        {
            AppiumCheckSettings clone = Clone_();

            clone.targetElement_ = targetElement;
            return(clone);
        }
Example #2
0
        public AppiumCheckSettings Accessibility(By regionSelector, AccessibilityRegionType regionType)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Accessibility_(new AccessibilityRegionBySelector(regionSelector, regionType));
            return(clone);
        }
Example #3
0
        public AppiumCheckSettings Region(By by)
        {
            AppiumCheckSettings clone = Clone_();

            clone.targetSelector_ = by;
            return(clone);
        }
Example #4
0
        public AppiumCheckSettings Region(Rectangle rect)
        {
            AppiumCheckSettings clone = Clone_();

            clone.UpdateTargetRegion(rect);
            return(clone);
        }
Example #5
0
        public AppiumCheckSettings Accessibility(IWebElement element, AccessibilityRegionType regionType)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Accessibility_(new AccessibilityRegionByElement(element, regionType));
            return(clone);
        }
Example #6
0
        public AppiumCheckSettings Floating(IWebElement element, int maxOffset = 0)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Floating_(new FloatingRegionByElement(element, maxOffset, maxOffset, maxOffset, maxOffset));
            return(clone);
        }
Example #7
0
        public AppiumCheckSettings Floating(IWebElement element, int maxUpOffset, int maxDownOffset, int maxLeftOffset, int maxRightOffset)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Floating_(new FloatingRegionByElement(element, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset));
            return(clone);
        }
Example #8
0
        public AppiumCheckSettings Floating(By regionSelector, int maxOffset = 0)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Floating_(new FloatingRegionBySelector(regionSelector, maxOffset, maxOffset, maxOffset, maxOffset));
            return(clone);
        }
Example #9
0
        public AppiumCheckSettings Floating(By regionSelector, int maxUpOffset, int maxDownOffset, int maxLeftOffset, int maxRightOffset)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Floating_(new FloatingRegionBySelector(regionSelector, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset));
            return(clone);
        }
Example #10
0
        protected override CheckSettings Clone()
        {
            AppiumCheckSettings clone = new AppiumCheckSettings();

            base.PopulateClone_(clone);
            clone.targetElement_  = targetElement_;
            clone.targetSelector_ = targetSelector_;
            return(clone);
        }
Example #11
0
        /// <summary>
        /// Adds one or more ignore regions.
        /// </summary>
        /// <param name="selectors">An enumerbale of selectors representing regions to ignore when validating the screenshot.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public AppiumCheckSettings Ignore(IEnumerable <By> selectors)
        {
            AppiumCheckSettings clone = Clone_();

            foreach (By sel in selectors)
            {
                clone.Ignore_(new SimpleRegionBySelector(sel));
            }
            return(clone);
        }
Example #12
0
        public AppiumCheckSettings Accessibility(AccessibilityRegionType regionType, params IWebElement[] elementsToIgnore)
        {
            AppiumCheckSettings clone = Clone_();

            foreach (IWebElement element in elementsToIgnore)
            {
                clone.Accessibility_(new AccessibilityRegionByElement(element, regionType));
            }
            return(clone);
        }
Example #13
0
        public AppiumCheckSettings Floating(int maxUpOffset, int maxDownOffset, int maxLeftOffset, int maxRightOffset, params IWebElement[] elementsToIgnore)
        {
            AppiumCheckSettings clone = Clone_();

            foreach (IWebElement element in elementsToIgnore)
            {
                clone.Floating_(new FloatingRegionByElement(element, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset));
            }
            return(clone);
        }
Example #14
0
        /// <summary>
        /// Adds one or more content regions.
        /// </summary>
        /// <param name="elements">An enumerbale of elements, each representing a content region.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public AppiumCheckSettings Content(IEnumerable <IWebElement> elements)
        {
            AppiumCheckSettings clone = Clone_();

            foreach (IWebElement elem in elements)
            {
                clone.Content_(new SimpleRegionByElement(elem));
            }
            return(clone);
        }
Example #15
0
        /// <summary>
        /// Adds one or more ignore regions.
        /// </summary>
        /// <param name="selector">A selector representing a region to ignore when validating the screenshot.</param>
        /// <param name="selectors">One or more selectors representing regions to ignore when validating the screenshot.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public AppiumCheckSettings Ignore(By selector, params By[] selectors)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Ignore_(new SimpleRegionBySelector(selector));
            foreach (By sel in selectors)
            {
                clone.Ignore_(new SimpleRegionBySelector(sel));
            }
            return(clone);
        }
Example #16
0
        /// <summary>
        /// Adds one or more content regions.
        /// </summary>
        /// <param name="element">An element representing a content region.</param>
        /// <param name="elements">One or more elements, each representing a content region.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public AppiumCheckSettings Content(IWebElement element, params IWebElement[] elements)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Content_(new SimpleRegionByElement(element));
            foreach (IWebElement elem in elements)
            {
                clone.Content_(new SimpleRegionByElement(elem));
            }
            return(clone);
        }