Example #1
0
        public List <Shape> GetShapes()
        {
            var shapes = new List <Shape>();

            List <IWebElement> shapeElements = CurrentLayer.FindElements(By.CssSelector("*")).ToList();

            shapeElements.Remove(shapeElements.First());

            shapeElements.ForEach(el => shapes.Add(new Shape(
                                                       fillColor: el.GetAttribute("fill"),
                                                       strokeColor: el.GetAttribute("stroke"),
                                                       opacityValue: double.Parse(el.GetAttribute("opacity")),
                                                       strokeWidth: int.Parse(el.GetAttribute("stroke-width")))));

            return(shapes);
        }