function waitForUI5Object(oFrameWindow, sId) {
			var iChecksCount = 0;
			return new Promise(function(resolve, reject) {

				function _checkObjectCreated() {
					var oCore = oFrameWindow && oFrameWindow.sap && oFrameWindow.sap.ui.getCore && oFrameWindow.sap.ui.getCore(),
						oObject = oCore && oCore.byId(sId);
					if (oObject) {
						resolve(oObject);
						return;
					}
					if (iChecksCount++ > 300) {
						reject();
					}
					setTimeout(_checkObjectCreated, 10);
				}

				_checkObjectCreated();
			});
		}
/**
		 * Waits for a UI5 object with the given id to be created in the frame window
		 * @param sId
		 * @returns {Promise<any>}
		 */
Waits for a UI5 object with the given id to be created in the frame window
@param sId
@returns {Promise}
Waits for a UI5 object with the given id to be created in the frame window @param sId @returns { Promise }
function waitForUI5Object(oFrameWindow, sId) {
			var iChecksCount = 0;
			return new Promise(function(resolve, reject) {
				function _checkObjectCreated() {
					var oCore = oFrameWindow && oFrameWindow.sap && oFrameWindow.sap.ui.getCore && oFrameWindow.sap.ui.getCore(),
						oObject = oCore && oCore.byId(sId);
					if (oObject) {
						resolve(oObject);
						return;
					}
					if (iChecksCount++ > 300) {
						reject();
					}
					setTimeout(_checkObjectCreated, 10);
				}
				_checkObjectCreated();
			});
		}
function waitForUI5Object ( oFrameWindow , sId ) { var iChecksCount = 0 ; return new Promise ( function ( resolve , reject ) { function _checkObjectCreated ( ) { var oCore = oFrameWindow && oFrameWindow . sap && oFrameWindow . sap . ui . getCore && oFrameWindow . sap . ui . getCore ( ) , oObject = oCore && oCore . byId ( sId ) ; if ( oObject ) { resolve ( oObject ) ; return ; } if ( iChecksCount ++ > 300 ) { reject ( ) ; } setTimeout ( _checkObjectCreated , 10 ) ; } _checkObjectCreated ( ) ; } ) ; }
Waits for a UI5 object with the given id to be created in the frame window
 @param sId
 @returns {Promise<any>}
Waits for a UI5 object with the given id to be created in the frame window @param sId @returns { Promise<any > }