An open API service indexing awesome lists of open source software.

https://github.com/ylemkimon/selenium-proxy

A Selenium WebDriver / Browserstack proxy
https://github.com/ylemkimon/selenium-proxy

browserstack selenium selenium-webdriver

Last synced: 5 months ago
JSON representation

A Selenium WebDriver / Browserstack proxy

Awesome Lists containing this project

README

          

# selenium-proxy

## Routes
### `POST /build`
#### Request
```json
{
"browserstack": boolean,
"capabilities": object,
"seleniumURL": string
}
```

#### Response
```json
{
"id": string,
"capabilities": object
}
```

The `WebDriver` can be reconstructed using:
```js
const selenium = require("selenium-webdriver");
const seleniumHttp = require("selenium-webdriver/http");

const session = new selenium.Session(res.body.id, res.body.capabilities);
const client = Promise.resolve(seleniumURL)
.then(url => new seleniumHttp.HttpClient(url));
const executor = new seleniumHttp.Executor(client);
driver = new selenium.WebDriver(session, executor);
```

## Environment variables
### `SERVER_HOST`
The host of the server (default: `0.0.0.0`)

### `SERVER_PORT`
The port of the server (default: `4445`)

### `BROWSERSTACK_USER`
The username of the Browserstack accout

### `BROWSERSTACK_ACCESS_KEY`
The acess key of the Browserstack accout

## Note
This project is not intended as a secure proxy. Credentials and information may leak!