

It is recommended that during recording, when you change focus from the SAP application to the embedded browser, you enter a comment using the recording toolbar. The SAP application sends HTML events that are recorded, and the WEB protocol recorder may catch the same calls coming from the embedded browser. When working with the WEB protocol together with the SAPGUI protocol, it is important to avoid duplicate HTML requests. If the path to the property you want contains a period that is not part of the DOM expression, escape the period with a backslash (\.). To create your expression for the DOMPath, use any DHTML viewer to explore the DOM of the page displayed in the HTML container. Delete the first characters (corresponding to the current session ID) and the current window id ("ses/wnd/").

To get the htmlViewerID, right click on the HTML container in a SAP GUI snapshot and select Copy Control ID. sapgui_htmlviewer_dom_get_property enables you to get information from the DOM of the page in the browser control using standard DOM syntax. You may, for example, need a session ID or some other dynamic value from the HTML response for use in correlating a sapgui_htmlviewer_send_event call. SAP is aware of much of the activity in the embedded browser, but you may need to get information that cannot be retrieved by the SAP functions. SAP has a browser control, or HTML container, that allows the user to work on a web page that appears to be embedded in the SAP application. Sapgui_htmlviewer_dom_get_property evaluates a DOM expression on the page in the embedded browser and saves the results to a parameter. The parameter to which to save the value of the DOM expression. int sapgui_htmlviewer_dom_get_property( const char * htmlViewerID, const char * DOMPath, const char* paramName, LAST ) htmlViewerID Sapgui_htmlviewer_dom_get_property Example: sapgui_htmlviewer_dom_get_propertyĮvaluates a DOM query on the web page contained inside the SAP application.
