https://github.com/browserstack/python-selenium-browserstack
https://github.com/browserstack/python-selenium-browserstack
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/browserstack/python-selenium-browserstack
- Owner: browserstack
- Created: 2022-04-04T05:16:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-03T13:54:23.000Z (over 1 year ago)
- Last Synced: 2026-02-10T20:42:32.677Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 9
- Watchers: 12
- Forks: 31
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# python-selenium-browserstack
Run python tests on browserstack using the SDK.
## Prerequisite
```
python3 should be installed
```
## Setup
* Clone the repo
```
git clone -b sdk https://github.com/browserstack/python-selenium-browserstack.git
```
* Install packages through requirements.txt
```
pip3 install -r requirements.txt
```
## Set BrowserStack Credentials
* Add your BrowserStack username and access key in the `browserstack.yml` config fle.
* You can also export them as environment variables, `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY`:
#### For Linux/MacOS
```
export BROWSERSTACK_USERNAME=
export BROWSERSTACK_ACCESS_KEY=
```
#### For Windows
```
setx BROWSERSTACK_USERNAME=
setx BROWSERSTACK_ACCESS_KEY=
```
## Running tests
* Run sample test:
- To run the sample test across platforms defined in the `browserstack.yml` file, run:
```
browserstack-sdk ./tests/test.py
```
* Run tests on locally hosted website:
- To run the local test across platforms defined in the `browserstack.yml` file, run:
```
browserstack-sdk ./tests/local-test.py
```