IE Connector methods
Summarize
Summary of IE Connector methods
The IE Connector methods enable ServiceNow customers to automate and interact with Internet Explorer browser sessions efficiently. These methods are organized into three levels—connector, screen, and element—allowing precise control over browser navigation, screen interactions, and individual web elements. Proper configuration of these methods helps streamline automation workflows involving web pages accessed via Internet Explorer.
Show less
Connector Level Methods
Connector-level methods primarily manage browser navigation and session state:
- Navigate: Opens a specified URL and returns whether the navigation was successful.
- WaitForAnyScreen: Waits for a screen to load with an optional timeout.
- IsReady: Checks if the website is ready to accept commands.
- IsCreated: Verifies if an IE browser window with the website is open, optionally confirming all elements are matched.
- Refresh, SaveAs, Print: Controls page refresh, saving, and printing.
- Minimize, Maximize, Hide, Restore, Focus: Manage window visibility and focus.
- Close: Closes the active IE window.
Screen Level Methods
Screen-level methods handle interactions with web pages and their content, often requiring configuration before use:
- DownloadFile: Downloads files by specifying URL and filename.
- ExecuteJavaScript: Runs custom JavaScript on the page; requires configuration of the script and parameters.
- GetValueByXPath, GetValuesByXPath: Extracts data from the page using XPath expressions; configuration involves specifying columns and XPath queries.
- GetURL, GetTitle, GetPageSource: Retrieves URL, page title, and HTML source respectively.
- SetFields, GetFields: Sets or retrieves form field data, needing prior configuration of form elements and data types.
- SendKeys: Simulates keyboard input with options for delay and matching child elements.
- WaitForCreate: Introduces a delay for page or window load.
- MatchChildren: Checks if all web page elements match captured elements.
- GetScreenShot: Captures screenshots of windows or specific areas.
Element Level Methods
These methods are accessed by interacting with specific web elements in the Project Explorer and allow granular operations:
- Click: Performs a click on the element.
- GetInnerHTML, GetOuterHTML: Retrieves the inner or outer HTML content of the element.
- GetInnerText: Gets the text content within the element.
- GetURL: Obtains the URL associated with the element.
Practical Application
ServiceNow customers can leverage these methods to automate data extraction, form manipulation, file downloads, and browser control within Internet Explorer-based workflows. Proper setup and configuration of JavaScript execution, XPath expressions, and form elements are necessary for successful automation. These capabilities enhance integration with legacy web applications accessed through IE, ensuring reliable and efficient process automation.
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