src/service/page.test-helper.js
/**
             * 
             * @param apiFunctionName, one of the api function (find,exists...)
             * @param locator,  jquery selector
             * @param includeElement, by default only search among the descendants, excluding parent.
             * 
             * @returns a function to that would run the selected action function on its query selector when called;
             */
@param apiFunctionName, one of the api function (find,exists...)
@param locator,  jquery selector
@param includeElement, by default only search among the descendants, excluding parent.

@returns a function to that would run the selected action function on its query selector when called.
@param apiFunctionName one of the api function ( find exists ... ) @param locator jquery selector @param includeElement by default only search among the descendants excluding parent . @returns a function to that would run the selected action function on its query selector when called .
function doFn(apiFunctionName, locator, includeElement) {
                return function () {
                    if (!api[apiFunctionName]) {
                        throw new Error('Test function [' + apiFunctionName + '] does not exist.');
                    }
                    return api[apiFunctionName](locator, includeElement);
                }
            }
function doFn ( apiFunctionName , locator , includeElement ) { return function ( ) { if ( ! api [ apiFunctionName ] ) { throw new Error ( 'Test function [' + apiFunctionName + '] does not exist.' ) ; } return api [ apiFunctionName ] ( locator , includeElement ) ; } }
@param apiFunctionName, one of the api function (find,exists...)
 @param locator,  jquery selector
 @param includeElement, by default only search among the descendants, excluding parent.
@param apiFunctionName one of the api function ( find exists ... ) @param locator jquery selector @param includeElement by default only search among the descendants excluding parent .