The control displays a web browser based upon a URL stored as a variable value.
The Web Browser controls support dynamic properties to allow manipulation of HTML controls in EEPs with the PROPERTY and GETPROPERTY commands. The dynamic properties are useful in the following:
•Integrating local data with web sites that do not have an API
•Automating web page tasks within R:BASE
•Extracting data from web pages
* Please note that HTML skills would be required to be able to inspect the underlying web pages, to determine how to identify the objects/tags.
Dynamic Properties
HTML elements can be referenced by TAG, ID, and NAME. For a well defined HTML page, the ID alone is enough to locate the HTML element. In case of conflicts combination of the three identifiers can be used depending on the document.
The property name is preceded with an underscore to distinguish between dynamic and non-dynamic properties. Dynamic property is composed of the property name and the HTML element identifiers.
The full dynamic property name syntax is: "_PROP|TAG xxx|ID yyy|NAME zzz"
_CLICK - simulates a mouse click on a control on the page (e.g. button, link). This can be used to initiate form submission after filling the HTML input controls.
PROPERTY WebBrowser1 "_CLICK|ID btnSubmit" "AnyValue"
_VALUE - specifies the value of the HTML control
PROPERTY WebBrowser1 "_VALUE|ID txtName" ".vNameFromDatabase"
GETPROPERTY WebBrowser1 "_VALUE|ID txtName" "vNameFromDatabase"
_INNER_HTML - specifies the HTML between the start and end tags of the object. For the object "<p>Text <b>here</b>...</p>", the INNER_HTML is "Text <b>here</b>..."
PROPERTY WebBrowser1 "_INNER_HTML|ID txtName" ".vNameFromDatabase"
GETPROPERTY WebBrowser1 "_INNER_HTML|ID txtName" "vNameFromDatabase"
_INNER_TEXT - specifies the text between the start and end tags of the object stripping all the tags. For the object "<p>Text <b>here</b>...</p>", the INNER_TEXT is "Text here..."
PROPERTY WebBrowser1 "_INNER_TEXT|ID txtName" ".vNameFromDatabase"
GETPROPERTY WebBrowser1 "_INNER_TEXT|ID txtName" "vNameFromDatabase"
_OUTER_HTML - specifies the object and its content in HTML. For the object "<p>Text <b>here</b>...</p>", the OUTER_HTML is "<p>Text <b>here</b>...</p>"
PROPERTY WebBrowser1 "_OUTER_HTML|ID txtName" ".vNameFromDatabase"
GETPROPERTY WebBrowser1 "_OUTER_HTML|ID txtName" "vNameFromDatabase"
_OUTER_TEXT - specifies the text of the object. For the object "<p>Text <b>here</b>...</p>", the OUTER_HTML is "Text here... "
PROPERTY WebBrowser1 "_OUTER_TEXT|ID txtName" ".vNameFromDatabase"
GETPROPERTY WebBrowser1 "_OUTER_TEXT|ID txtName" "vNameFromDatabase"
_<TagAttribute> - gets the value of an attribute inside the tag. e.g. to get the link of an anchor tag (A) use "HREF".
PROPERTY WebBrowser1 "_HREF|ID linkNewEmp" ".vNewLink"
GETPROPERTY WebBrowser1 "_HEIGHT|TAG IMG|ID imgEmpPhoto" "vPicHeight"
_ID_LIST - captures a CSV string of element IDs
Get all IDs:
GETPROPERTY WebBrowser1 "_ID_LIST" "vIDList"
Get IDs of all anchors:
GETPROPERTY WebBrowser1 "_ID_LIST|TAG A" "vIDList"
Get IDs of all dropdowns:
GETPROPERTY WebBrowser1 "_ID_LIST|TAG SELECT" "vIDList"
_NAME_LIST - captures a CSV string of element Names
Get all Names:
GETPROPERTY WebBrowser1 "_NAME_LIST" "vNameList"
Get Names of all anchors:
GETPROPERTY WebBrowser1 "_NAME_LIST|TAG A" "vNameList"
Get Names of all dropdowns:
GETPROPERTY WebBrowser1 "_NAME_LIST|TAG SELECT" "vNameList"
_CUSTOM_LIST - captures a CSV string of element details. Key columns are TAG, ID, NAME, VALUE. At least one of the four columns should be specified. Additional columns can be added; INNER_HTML, INNER_TEXT, OUTER_HTML, OUTER_TEXT, <TagAttribute>. The order of the four required columns is fixed. The optional columns are ordered based on the order in the field list.
GETPROPERTY WebBrowser1 "_CUSTOM_LIST|FIELDS ID,VALUE" "vIDValuePairs"
GETPROPERTY WebBrowser1 "_CUSTOM_LIST|FIELDS ID,SRC|TAG IMG" "vImageList"