protected override string DoImpl()
        {
            var searchValue = this.Parameters["value"].ToString();
            var searchPolicy = this.Parameters["using"].ToString();

            var searchStrategy = new By(searchPolicy, searchValue);

            WiniumElement winiumElement;

            if (this.ElementId == null)
            {
                winiumElement =
                    WiniumVirtualRoot.Current.Find(TreeScope.Descendants, searchStrategy.Predicate).FirstOrDefault();
            }
            else
            {
                var parentElement = this.Automator.ElementsRegistry.GetRegisteredElement(this.ElementId);
                winiumElement = parentElement.Find(TreeScope.Descendants, searchStrategy.Predicate).FirstOrDefault();
            }

            if (winiumElement == null)
            {
                throw new AutomationException("Element cannot be found", ResponseStatus.NoSuchElement);
            }

            var registeredKey = this.Automator.ElementsRegistry.RegisterElement(winiumElement);
            var registredObjects = new JsonElementContent(registeredKey);

            return this.JsonResponse(ResponseStatus.Success, registredObjects);
        }
        protected override string DoImpl()
        {
            var searchValue = this.Parameters["value"].ToString();
            var searchPolicy = this.Parameters["using"].ToString();

            var searchStrategy = new By(searchPolicy, searchValue);
            List<WiniumElement> result;

            if (this.ElementId == null)
            {
                result = WiniumVirtualRoot.Current.Find(TreeScope.Descendants, searchStrategy.Predicate).ToList();
            }
            else
            {
                var parentElement = this.Automator.ElementsRegistry.GetRegisteredElement(this.ElementId);
                result = parentElement.Find(TreeScope.Descendants, searchStrategy.Predicate).ToList();
            }

            var registredObjects = new List<JsonElementContent>();

            foreach (var winiumElement in result)
            {
                var registeredKey = this.Automator.ElementsRegistry.RegisterElement(winiumElement);
                registredObjects.Add(new JsonElementContent(registeredKey));
            }

            return this.JsonResponse(ResponseStatus.Success, registredObjects.ToArray());
        }