function processNext() {
                var current = res.value.pop();

                return that.elementIdLocation(current.ELEMENT).catch(function (err) {
                    hasError = true;
                    reject(err);
                }).then(function (location) {
                    if (hasError) {
                        return;
                    }

                    if (prop === 'x' || prop === 'y') {
                        results.push(location.value[prop]);
                    } else {
                        results.push({
                            x: location.value.x,
                            y: location.value.y
                        });
                    }

                    if (res.value.length) {
                        return processNext();
                    } else {
                        resolve(results.length === 1 ? results[0] : results);
                    }
                });
            }
throw NoSuchElement error if no element was found