IE Connector methods
Summarize
Summary of IE Connector methods
The IE connector methods enable automation and interaction with Internet Explorer browser elements, screens, and the connector itself. These methods are organized across three levels—connector, screen, and element—allowing ServiceNow customers to perform a variety of tasks such as navigating web pages, manipulating browser windows, interacting with web page elements, and executing custom scripts. Proper configuration steps are required to expose and utilize these methods effectively.
Show less
Connector level methods
Connector level methods provide control over browser navigation and status checks. Key capabilities include:
- Navigate: Opens a web page by URL, returning a Boolean to indicate success.
- WaitForAnyScreen: Waits for a screen to load with configurable timeout.
- IsReady: Checks if the website is ready to accept requests.
- IsCreated: Verifies if a website is open and optionally if all elements match.
- Refresh, SaveAs, Print: Manage page content by reloading, saving locally, or printing.
- Minimize, Maximize, Hide, Restore: Control browser window visibility and state.
- GetURL, GetTitle, GetPageSource: Retrieve URL, window title, or full page source as strings.
- GetScreenShot: Capture a bitmap screenshot of the window or a specific area.
- Close: Closes the active browser window.
Screen level methods
Screen level methods are designed to interact with web page elements and perform actions such as data extraction, file downloads, and input simulation. Notable methods include:
- DownloadFile: Downloads a file from the current screen using specified URL and filename.
- ExecuteJavaScript: Runs custom JavaScript on the open page after configuring the script and parameters.
- GetValueByXPath and GetValuesByXPath: Extract data using XPath expressions, returning strings or data tables respectively.
- SetFields: Sets data into form fields after configuring the target elements and data types.
- SendKeys: Simulates keystroke inputs with options for delay and matching child elements.
- WaitForCreate: Delays actions until the page or window has loaded.
- GetFields: Retrieves data from form elements, requiring prior configuration.
- Focus: Brings a background or minimized window to the foreground.
- MatchChildren: Checks if all captured elements match, returning a Boolean.
Element level methods
Element level methods apply to specific elements within the web page and include:
- Click: Performs a click action on the selected element.
- GetInnerHTML, GetOuterHTML, GetInnerText: Retrieve the HTML content or inner text of the element as strings.
- GetURL: Obtains the URL associated with the element.
Practical application for ServiceNow customers
By leveraging IE connector methods at different levels, ServiceNow customers can automate Internet Explorer browsing tasks, extract data efficiently, interact with web forms, and control browser windows programmatically. Configuring these methods correctly ensures robust automation workflows in scenarios involving legacy Internet Explorer-based applications, enabling streamlined data integration and process automation within ServiceNow environments.
The IE connector methods perform different tasks on the IE connector, screens, and the elements on the screens. The methods are available at the connector, screen, and the element levels and you can expose the methods by completing appropriate steps.
IE connector method levels
Connector level methods
Navigate
- Input
- URL
- Output
- Return (Boolean)
WaitForAnyScreen
The method executes a wait period before a screen loads up. You can specify a timeout after which the method times out the request.
Input
Screen level methods
DownloadFile
- Input
- Url
- Output
- Return (Boolean)
ExecuteJavaScript
Executes custom JavaScript on an application or website open on the IE browser. You must configure the method before executing.
- Click the method settings icon (
).
- Enter the custom script under the JAVA SCRIPT section.
- To add parameter to the script, click the add parameter icon
(
) under the PARAMETER heading.
Note:A Data In port is added with each parameter. - Click OK.
- Input
- Parameter
- Output
- Return (Object)
GetValueByXPath
- Input
- XPath (String)
- Output
- Return (String)
GetValuesByXPath
Returns the values within columns based on the specified XPath expression.
Input
- Click the method settings icon (
).
- Update the name of the column.
- Define the XPath expression.
- Click OK.
Output
Returns the data table after the operation.
Hide
Hides the active browser window.
Restore
Restores the browser window hidden using the Hide method.
GetURL
Returns the URL of the website or web page.
Output
WaitForCreate
Sets a delay before a web page or a window loads.
Inputs
Outputs
SetFields
Sets the data in form field types.
SendKeys
Simulates the keystrokes on web pages and windows.
Inputs
Minimize
Minimizes the window.
Maximize
Maximizes the window.
IsReady
Returns the Boolean response to the request to check whether the website is ready to accept requests from methods.
Output
MatchChildren
Matches all elements of a web page that you have captured and returns a Boolean response accordingly. You can configure whether the method should match all children.
Input
Output
IsCreated
- Inputs
- MatchAllChildren
- Output
- Return (Boolean)
Refresh
Reloads the contents of the active web page.
SaveAs
Saves the active web page to the local disk.
Prints the active web page in the browser.
Input
GetPageSource
Returns the page source of the active window open on the IE browser.
Output
GetScreenShot
Returns the screen shot of a window or area in a window.
Output
GetTitle
Returns the title of a window open in the IE browser.
Output
GetFields
Accesses data in the forms returns the data as output. You must configure the method before executing.
- Click the method settings icon (
).
- Select the form elements.
- Update the form element data type.
- Click OK.
Output
Focus
Sets the focus on a window that is running in the background or minimized and makes it active.
Output
Close
Closes the active window.
Element level methods
These methods are exposed when you double-click an application element under the Global Objects in the Project Explorer.
Click
Performs a click operation on the element.
GetInnerHTML
Gets the inner HTML of the element.
Output
GetInnerText
Gets the inner text of an element.
Output
GetOuterHTML
Gets the outer HTML of the element.
Output
GetURL
Gets the URL of the element.
Output