Beispiel #1
0
        public int GetPieChartShowSpans()
        {
            IWebElement pie = FindChild(PieLocator);

            IWebElement[] piePaths   = ElementHandler.FindElements(PathLocator, pie).ToArray();
            int           pieNumbers = piePaths.Length;
            int           hiddenSpan = 0;

            foreach (IWebElement piePath in piePaths)
            {
                pieNumbers--;
                if (pieNumbers >= 0)
                {
                    bool isHidden = piePath.GetAttribute("visibility").Contains("hidden");
                    if (isHidden)
                    {
                        hiddenSpan++;
                    }
                }
                else
                {
                    break;
                }
            }
            return(piePaths.Length - hiddenSpan);
        }
Beispiel #2
0
        private IWebElement GetExpanderElement(IWebElement nodeElement)
        {
            Locator imageButtonsLocator = ControlLocatorRepository.GetLocator(ControlLocatorKey.TreeNodeImage);

            IWebElement[] imageButtons = ElementHandler.FindElements(imageButtonsLocator, nodeElement);// nodeElement.FindElements(imageButtonsLocator.ToBy()).ToArray();

            return(imageButtons[imageButtons.Length - 2]);
        }
Beispiel #3
0
        public int GetNodeIndentation(string nodeText)
        {
            IWebElement node = GetTreeNodeElement(nodeText);

            Locator indentationIconLocator = new Locator("img", ByType.TagName);

            return(ElementHandler.FindElements(indentationIconLocator, container: node).Length);//.FindElements(indentationIconLocator.ToBy()).Count - 1;
        }
Beispiel #4
0
        public int GetPieDistributions()
        {
            IWebElement pie = FindChild(PieLocator);

            IWebElement[] piePaths   = ElementHandler.FindElements(PathLocator, pie).ToArray();
            int           pieNumbers = piePaths.Length;

            return(pieNumbers);
        }
Beispiel #5
0
        public bool HasDrawnPie()
        {
            IWebElement pie = FindChild(PieLocator);

            IWebElement[] piePaths   = ElementHandler.FindElements(PathLocator, pie).ToArray();
            int           pieNumbers = piePaths.Length / 2;

            return(pieNumbers > 0);
        }
Beispiel #6
0
 protected virtual IWebElement[] FindChildren(Locator locator)
 {
     return(ElementHandler.FindElements(locator, container: this.RootElement).ToArray());
 }
Beispiel #7
0
 private IWebElement[] FindChildren(Locator locator, IWebElement parent)
 {
     return(ElementHandler.FindElements(locator, parent).ToArray());
 }
Beispiel #8
0
 private bool LineChartPathChildExists(Locator locator, IWebElement parent)
 {
     return(ElementHandler.FindElements(locator, parent).ToArray().Length > 1);
 }