The `browserstack-local` Python library provides bindings for the BrowserStack Local testing feature. It allows users to test websites hosted on local development environments, staging environments, or behind firewalls/proxies, by establishing a secure tunnel between the user's machine and the BrowserStack cloud. The library is currently at version 1.2.14 and maintains an active development status with a positive release cadence, often releasing new versions within three months.
pip install browserstack-localVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to initialize, start, check the status of, and stop a BrowserStack Local tunnel. It uses an environment variable for the BrowserStack Access Key, which is the recommended practice for security. The `verbose` option is added for detailed logging.
Ensure stable internet connectivity and appropriate firewall/proxy settings. From v1.2.1, the library attempts to re-download corrupt binaries. Manually delete the binary (often in a temporary directory) to force a fresh download if issues persist.
Ensure each concurrent local connection uses a unique `localIdentifier` argument. Alternatively, use the `force: true` option to automatically terminate other running instances when starting a new one.
Ensure `binary_path` points to a valid and accessible BrowserStack Local binary. If you encounter issues, consider removing this option and letting the library manage the binary automatically.
Upgrade to `browserstack-local` version `1.1.0` or newer to ensure reliable environment variable processing for your access key.
Terminate all existing BrowserStack Local processes. If starting multiple local connections, ensure each uses a unique `localIdentifier` in `bs_local_args`. You can also use the `force: true` option in `bs_local_args` to automatically kill other instances.
Ensure stable internet connectivity and appropriate firewall/proxy settings. The library (from v1.2.1) attempts to re-download corrupt binaries automatically. If the issue persists, manually delete the binary (typically located in a temporary directory specific to the library) to force a fresh download.
Verify your internet connection. If you are behind a corporate proxy, ensure that `proxyHost`, `proxyPort`, `proxyUser`, and `proxyPass` are correctly configured in your `bs_local_args`. Check your system's firewall rules to ensure they allow outgoing connections from the BrowserStack Local binary.
No dependency data recorded yet.