replaceSelectorsById = function replaceSelectorsById(actions, elements) {
    return actions.map(function (action) {
        if (Array.isArray(action)) {
            return replaceSelectorsById(action, elements);
        }

        if (!action.options || !action.options.selector) {
            return action;
        }

        elements.forEach(function (element) {
            if (action.options.selector === element.selector) {
                action.options.element = element.value.ELEMENT;
                delete action.options.selector;
            }
        });

        return action;
    });
}
replaces selector action properties with element ids after they got fetched
@param  {Object[]} actions  list of actions
@param  {Object[]} elements list of fetched elements
@return {Object[]}          list of actions with proper element ids