Purpose | With ConectHTML you can read values from an HTML page that you have displayed with the Control or WebView command. You can also change values and perform various actions, such as clicking on a link. Both your own HTML pages and any internet or intranet pages can be used. The display via Control/WebView can be integrated into the SAP screen or can be a separate "floating" window. | ||||||||||||||||||||||||||
Example |
ConectHTML click="button_Continue" The button "Continue" is clicked in the HTML page that is currently displayed via Control or WebView. |
||||||||||||||||||||||||||
Format |
After ConectHTML you can use HTML variables:
|
||||||||||||||||||||||||||
Options |
|
||||||||||||||||||||||||||
Options for WebView only |
|
||||||||||||||||||||||||||
Using the HTML elements | The
HTML variables can be used in the same way as the usual script variables
V[...]. Notation is html[...]. You can use it in following contexts:
After a new value is set, GuiXT automatically invokes the "on change" routine of the HTML page for this element. In the case of drop down fields (Select element) it is necessary in some cases to perform a click on this element after changing it, using click=. Otherwise some of the internal processing in the HTML page might be missing. When you automate the user interaction for an HTML page, the means provided by ConectHTML are sufficient in most cases (setting values and clicking on links, buttons or images). However, in other cases, where special JavaScript or VBScript functions are used or there are special plugins in the page, the automation of the user interaction can be beyond the ConectHTML capabilities. |
||||||||||||||||||||||||||
How to name the HTML elements | During development
we suggest you use the
listElements=
and
-showNames
features to display
the HTML element names. GuiXT builds the name of an element in the following way: The name always starts with the element type (image_, button_, checkbox_, ...). Next, the internal id or name of the element, or user text (like a button text). All "space" characters are replaced with underline. If duplicate names arise, GuiXT adds a suffix .2, .3,... . Examples: html[image_help.jpg]
|
||||||||||||||||||||||||||
HTML Tables | Tables are
quite common in HTML pages. They can be nested. GuiXT allows us to address
each table cell. For the names, GuiXT uses the following notation: cell_i.j.k
is cell number k of row j in table i. For example, html[cell_1.4.5] denotes a cell within the first table of the page, namely the cell in row 4, column 5 (starting with 1). For nested tables, the name starts with the name of the cell that contains the table, followed by '~' and the normal cell coordinates within the nested table. Example: html[cell_3_1_7~1_2_2~2.2.4] This is the following cell: Start with the third outer table of the page. Choose the cell in row 1, column 7. There is at least one nested table in this cell. Take the first one, and then the cell in row 2, column 2 of this first nested table. In this cell, there are at least 2 more nested tables (nesting level 2). Take the second one, go to row 2 and column 4, and you have reached cell cell_3_1_7~1_2_2~2.2.4. Row count for each table For each table GuiXT allocates an HTML variable "..._rows" that contains the number of rows for this table. For example, "&html[table_1_rows]" denotes the number of rows of the first table. For nested table, the same rules as described above apply. Example: "&html[table_3_1_7~1_rows]" This is the number of rows of the first nested table contained in cell row 1 column 7 of the third table on the page. Instead of using the row count, it is often more practical to query the existence of a certain cell. Example: // row index |
||||||||||||||||||||||||||
Checkbox and radiobutton | The values
of a checkbox or radiobutton are represented by 0 and 1. When
you set a radiobutton all other radiobuttons in the same group are automatically
reset. Example:
|
||||||||||||||||||||||||||
Object "guixt" | If a global JavaScript function "guixt_initialize" exists in the HTML page, it is called with the first ConectHTML statement and the "guixt" object is passed, with which communication between GuiXT and JavaScript functions is possible. Details can be found in Object "guixt" in VBScript and JavaScript. | ||||||||||||||||||||||||||
Components | GuiXT + Controls |