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
- Host: GitHub
- URL: https://github.com/ylemkimon/selenium-proxy
- Owner: ylemkimon
- License: other
- Created: 2020-11-15T10:52:54.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T02:46:08.000Z (about 1 year ago)
- Last Synced: 2025-01-23T16:54:00.700Z (11 months ago)
- Topics: browserstack, selenium, selenium-webdriver
- Language: JavaScript
- Homepage:
- Size: 644 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!