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

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

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

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

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

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

            clone.Floating_(new FloatingRegionByElement(element, maxOffset, maxOffset, maxOffset, maxOffset));
            return(clone);
        }
Exemple #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);
        }
Exemple #8
0
        public AppiumCheckSettings Floating(By regionSelector, int maxOffset = 0)
        {
            AppiumCheckSettings clone = Clone_();

            clone.Floating_(new FloatingRegionBySelector(regionSelector, maxOffset, maxOffset, maxOffset, maxOffset));
            return(clone);
        }
Exemple #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);
        }
Exemple #10
0
        protected override CheckSettings Clone()
        {
            AppiumCheckSettings clone = new AppiumCheckSettings();

            base.PopulateClone_(clone);
            clone.targetElement_  = targetElement_;
            clone.targetSelector_ = targetSelector_;
            return(clone);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }