IE Browser

IE Browser

The Browser control manages the display and interaction with a web browser. It allows for direct access to and manipulation of document elements including forms and form elements.

Properties

  • FieldName: A string representing the name of the control. This can be used for retrieving the control.

  • Label: A string representing the label that should be displayed beside the field on the form.

  • LabelVisible: A boolean value representing whether or not the label should be displayed.

  • TypeName: A string representing the full name of the control type.

  • WebBrowser: The underlying IE WebBrowser object being managed by this control.

Methods

  • CheckHandlerQueue(): Forces an immediate check of the page handler queue. This is primarily used when JavaScript and AJAX enabledpages perform updates that do not require an actual page change in thebrowser, but need to be detected and checked by the browser.

  • ClickObject(string objectId): Searches for an element on the page whose ID matches the objectId provided and attempts to invoke the object's Click member. If no elements are found using an ID, a search will be done based on element names rather than ID. In this case, the object will only be considered a match if it is the only object with the given name. This is equivalent to calling ClickObjectInFrame with a nil frameName.

  • ClickObjectByReference(HtmlElement clickableObject): Attempts to invoke the provided object's "Click" member. The object does not need to be a button, most elements will have a click member.

  • ClickObjectInFrame(string objectId, string frameName)Searches for an element with an id matching objectId that is contained in a frame with a name matching frameName. If the frame cannot be found or if frameName is nil, it will attempt to use the current page's primary frame. Once a matching element is found, the element's "click" member is invoked.

  • GetElementByCollectionIndex(HtmlElementCollection collection, int index)Returns the HtmlElement that is assigned to the provided index of the provided collection.  This method is no longer necessary as the system now supports the get_Item syntax for retrieving indexed items - collection:get_Item(0) is the same as GetElementByCollectionIndex(collection, 0)

  • GetElementByWindowIndex(HtmlWindow window, int index)Returns the HtmlElement that is assigned to the provided index of the given window's collection of HtmlElements. This collection of elements contains ALL valid html elements in the frame.

  • GetElementInFrame(string frameName, string elementId)Attempts to locate an element with the specified ID in the frame whose name matches the specified frame name.

  • GetForm(HtmlWindow window, string formNameId)Attempts to locate the specific form element in the specified HtmlWindow by looking for forms whose name or id match the value specified. If window is nil, the search will begin in the base frame and search accessible frames recursively until a match is found.

  • GetFormElementFromForm(HtmlElement form, string fieldName)Attempts to locate a field owned by the form provided whose name or id matches the field name provided.

  • GetFormElementFromFormName(string formName, string fieldName)Attempts to locate a form whose name matches the form name provided, and if successful attempts to locate and return the element inside that form whose name matches the field name provided.

  • GetFrameByName(HtmlWindow window, string frameName)Attempts to locate a frame whose name matches the frameName provided. If window is nil, the search will begin in the page's base frame. If the frame cannot be found in the starting frame, a recursive search will be done on all of the frames contained in the starting frame.

  • GetFrameByWindowIndex(HtmlWindow window, int index)Returns the HtmlWindow assigned to the specified index of the collection of frames belonging to the provided HtmlWindow.

  • GetParentElement(HtmlElement source)Returns the element that is currently the parent of the HtmlElement provided.

  • Navigate(string url)Attempts to load the specified url into the browser.

  • RegisterPageHandler(string idType, string id, string handlerName, bool critical)Registers a new page handler for use in detecting when pages that have automated actions associated with them are loaded and alerting the addon script to respond to the page load.

  • SetFormValue(object form, string fieldName, string value)Attempts to locate the specified field in the provided form and set the field's value to the value provided.

  • StartPageWatcher(double checkInterval, double maxWatchTime)Starts the page watcher, which will check the page handler queue (and critical page handlers) at an interval defined by checkInterval. If no match is found when the maxWatchTime is reached, the handler will stop. This is primarily used on pages that use AJAX or other similar methods to make dynamic changes to the page content without actually changing pages. In these cases, a page watcher can be started before performing an action that will cause a page update so that the new page state can be checked.

  • StopPageWatcher()Stops the page watcher so that it will not perform any more checks on the page handler queue

  • SubmitForm(string formName)Attempts to find the form and invoke the form's "submit" member.