Skip to main content

Virtual USB CLI: Connect to Existing Session

Connect to an existing Virtual USB (vUSB) session in lieu of launching a new vUSB session.

Usage

$ <main class> [OPTIONS] connect [OPTIONS]

Options Details

--sessionId

| REQUIRED | STRING |

The unique identifier of your test session. You can retrieve the session ID of an active session using the sessions command.

--username

| REQUIRED | STRING |

A valid Sauce Labs user account. You can find your username on the Sauce Labs User Settings page. This option supports environment variable values.

--accessKey

| REQUIRED | STRING |

The authentication access key associated with your Sauce Labs user account. You can find your access key on the Sauce Labs User Settings page. This option supports environment variable values.

--serverHost

| OPTIONAL | URL ADDRESS |

A specific vUSB server host address. The default value, if not specified, is http://127.0.0.1.

--serverPort

| OPTIONAL | STRING |

A specific vUSB server port. The default value, if not specified, is 33657.

Examples

Basic Example with Required Flags

Connection Request
java -jar virtual-usb-client.jar connect --sessionId d03a1b81-158d-4bb4-bcc9-074e43dd8465 --username $SAUCE_USERNAME --accessKey $SAUCE_ACCESS_KEY
Sample Response
07:51:46.814 [main] INFO com.saucelabs.vusb.client.Runner - Runner Version 2.0.0
localhost:7000 online

Full Example with Optional Flags

java -jar virtual-usb-client.jar connect \
--sessionId d03a1b81-158d-4bb4-bcc9-074e43dd8465 \
--username $SAUCE_USERNAME \
--accessKey $SAUCE_ACCESS_KEY \
--serverHost http://127.0.0.1 \
--serverPort 8080 \