getSelectors = function getSelectors(actions) {
    var _this2 = this;

    var isMultiAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

    var queriedSelectors = [];

    /**
     * flatten actions array
     */
    if (isMultiAction) {
        actions = [].concat.apply([], actions);
    }

    return actions
    /**
     * map down to list of selectors
     */
    .map(function (action) {
        return action.options && action.options.selector;
    })
    /**
     * filter actions without selector and unique selectors
     */
    .filter(function (selector) {
        var res = Boolean(selector) && queriedSelectors.indexOf(selector) === -1;
        queriedSelectors.push(selector);
        return res;
    })
    /**
     * call element command on selectors
     */
    .map(function (selector) {
        return _this2.element(selector);
    });
}
option check
make sure action has proper options before sending command to Appium