Integrating with Selenium WebDriver

You can integrate Fortify WebInspect with Selenium Webdriver, also known as Selenium 2.0, to do the following:

Known Limitations

The following are known limitations for integrating Fortify WebInspect with Selenium Webdriver:

Process Overview

The process for integrating Fortify WebInspect with Selenium WebDriver is described in the following table.

Stage Description
1.

Fortify WebInspect must be able to capture traffic from a web browser using the Fortify WebInspect proxy. Do one of the following to enable proxy capture:

2. Install the Selenium WebDriver environment on the machine running Fortify WebInspect as described in Installing the Selenium WebDriver Environment.
3. Ensure that you can start up the Selenium Webdriver scripts from the command line and define your Allowed Hosts as described in Testing from the Command Line.
4. Optionally, upload all scripts and their dependencies to the Selenium API or manually copy them to the machine running Fortify WebInspect as described in Uploading Files to Fortify WebInspect.
5. Use the command from Stage 3 to run a scan using WI.exe or create a macro using the WebInspect REST API as described in Using the Selenium Command.
6.

Fix any errors that occur.

When conducting a scan with WI.exe or creating a macro in the API, the macro is validated. Errors and warnings are returned for each Selenium command. This feature is enabled by default. To disable it:

  • In WI.exe, use the argument -selenium_no_validation parameter. For more information, see Using wi.exe.

  • In the API, set the VerifyMacro parameter to false. For more information, see the Fortify WebInspect REST API Swagger UI.

To troubleshoot issues, view the Scan logs for errors and the StateRequestor logs for warnings.

Tip: Generally, logs are written to the following directory paths:

  • If an API scan runs as the SYSTEM USER, which is the default user, then logs are written to:

    C:\ProgramData\HP\HP WebInspect\Schedule\logs\<scan_guid>\ScanLog

    C:\ProgramData\HP\HP WebInspect\Schedule\logs\<scan_guid>\StateRequestor

  • All CLI and UI scans, and if an API scan runs as the current user, then logs are written to:

    C:\Users\<user.name>\AppData\Local\HP\HP WebInspect\Logs\<scan_guid>\ScanLog

    C:\Users\<user.name>\AppData\Local\HP\HP WebInspect\Logs\<scan_guid>\StateRequestor