Selenium Java Agent


The Selenium Agent is a JVM agent which is loaded at runtime and intercepts RemoteWebDriver method invocations to translate Selenium actions to mabl actions. No code changes are necessary when using this method. It is only necessary to load the mabl Selenium Agent by passing a JVM argument when you execute your Java Selenium Tests.

Obtain an API key

When using the Java Selenium Agent, the first step is to obtain an API key for your workspace. Open the mabl application in your browser, and navigate to Settings => APIs. Click the Create API Key button, and then select Java Selenium Agent as the key type. Enter a name for the key, such as Selenium Migration, and then click the Create button.

Create API keyCreate API key

Create API key

Download the agent

Next, download the mabl Selenium Agent jar file from here. Place this jar file in a location such as C:\mabl\mabl-selenium-agent.jar on Windows or ~/mabl/mabl-selenium-agent.jar on Linux/Mac.

Execute Selenium tests with the agent enabled

To migrate your Java Selenium tests, run your tests as you normally would but with an extra JVM argument:


For example, if you execute your tests using an IDE like Eclipse, create/edit a Run Configuration and add the agent to the JVM arguments:

Run configuration imageRun configuration image

Run configuration image

Agent arguments

The agent accepts a number of parameters:





mabl API key to use



Proxy to use to connect to mabl, specified as host:port



Username for proxy auth



Password for proxy auth



The name to use when saving the test to mabl


Parameters are passed as comma-delimited key-value pairs. The following is an example showing how to pass multiple arguments to the agent:


Did this page help you?