Build WebDriver Scripts

Build WebDriver Scripts
WebDriver Monitors run selenium XML scripts and collect results for real browser monitoring. You can manually create custom scripts or use the following tools:
Use Katalon Recorder to Create Scripts
The Katalon Recorder is a free browser extension that records browser activity in the selenium XML format. After you record, edit and test the script, you export the XML file and import the file into a WebDriver Monitor.
Follow these steps:
  1. Download and install the Katalon Recorder extension in either Chrome or Firefox.
  2. In the Katalon Recorder, select
    to create a test case within a test suite.
  3. Select
    to start recording the script. The Katalon Recorder disappears and starts recording your steps in the browser.
  4. Select
    to stop recording the script. The test steps appear in an ordered list.
  5. To edit the test steps, select the
    , or
    icons. You can also edit the command, target, and value of an individual test step.
  6. To test the script, select
    . Katalon runs the script in the browser window.
    To prevent browser data from interfering with the script, run the script in incognito (private) mode. WebDriver Monitor runs the XML scripts in incognito (private) mode.
  7. Select
    to save the final script to a human-readable XML format.
    You cannot re-import the XML file back to the Katalon Recorder. Instead, save the Test Suite as an HTML file for future editing.
  8. To upload the XML file to a WebDriver Monitor, open the WebDriver Monitor and select the
    tab select. Select
    on the
    Upload a valid WebDriver script
    field to find the XML file.
You recorded a script and uploaded an XML file to a WebDriver Monitor. For more information, see WebDriver Monitor.
Edit Selenium XMLYou can manually edit Selenium-based XML. Selenium Syntax contains three parameters:
  • Command
    Indicates the action, such as click, double click, open, and refresh
  • Target
    Represents the target element in the UI, for example, a field, link, or menu.
  • Value
    Specifies the value being selected or entered.
Example: Open Gmail Account
<selenese> <command>open</command> <target><![CDATA[]]></target> <value><![CDATA[]]></value></selenese> </selenese>
Supported Selenium Commands
The following topics list the supported Selenium commands for WebDriver Monitor.
  • Supported Selenium Commands-10.4
    The following Selenium commands are supported in CA ASM 10.4:
    • assertEval
    • verifyEval
    • assertNotEval
    • verifyNotEval
    • waitForEval
    • waitForNotEval
Link to children pages
For more information about Selenium command parameters, see Selenese (Selenium IDE) Commands Reference.
Troubleshoot RBM Scripts
The RBM Script Runs Successfully in Katalon, but Fails in WebDriver Monitor
The RBM script runs in Katalon Recorder without errors. After importing the XML file of the script to the WebDriver Monitor, the script fails due to elements not loading.
By default, the Katalon Recorder runs the recorded scripts in one cycle and does not pause for elements to load. Use
commands in the script to pause for the necessary elements.
Also see, WebDriver CLI.
Testing a Script in Katalon Fails
An RBM script fails in Katalon.
Browser data can affect the initial test in the Katalon Recorder. Use the incognito (private) mode to test the script in Katalon.
Error Message in WebDriver Monitor
The following message appears after a WebDriver Monitor runs a script: '
Command not specified'.
The WebDriver Monitor may not support a Selenium command in the script. For more information about supported Selenium commands, see Supported Selenium Commands.