Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Python bindings for BrowserStack Local.
pip install browserstack-local
from browserstack.local import Local
#creates an instance of Local
bs_local = Local()
#replace <browserstack-accesskey> with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
bs_local_args = { "key": "<browserstack-accesskey>" }
#starts the Local instance with the required arguments
bs_local.start(**bs_local_args)
#check if BrowserStack local instance is running
print(bs_local.isRunning())
#stop the Local instance
bs_local.stop()
Apart from the key, all other BrowserStack Local modifiers are optional. For the full list of modifiers, refer BrowserStack Local modifiers. For examples, refer below -
To enable verbose logging -
bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true"}
To test local folder rather internal server, provide path to folder as value of this option -
bs_local_args = { "key": "<browserstack-accesskey>" , "f": "/my/awesome/folder"}
To kill other running Browserstack Local instances -
bs_local_args = { "key": "<browserstack-accesskey>" , "force": "true"}
To disable local testing for Live and Screenshots, and enable only Automate -
bs_local_args = { "key": "<browserstack-accesskey>" , "onlyAutomate": "true"}
To route all traffic via local(your) machine -
bs_local_args = { "key": "<browserstack-accesskey>" , "forcelocal": "true"}
To use a proxy for local testing -
bs_local_args = { "key": "<browserstack-accesskey>", "proxyHost": "127.0.0.1", "proxyPort": "8000", "proxyUser": "user", "proxyPass": "password"}
To use local proxy in local testing -
bs_local_args = { "key": "<browserstack-accesskey>", "localProxyHost": "127.0.0.1", "localProxyPort": "8000", "-localProxyUser": "user", "-localProxyPass": "password"}
To use PAC (Proxy Auto-Configuration) in local testing -
bs_local_args = { "key": "<browserstack-accesskey>" , "-pac-file": "<pac_file_abs_path>"}
If doing simultaneous multiple local testing connections, set this uniquely for different processes -
bs_local_args = { "key": "<browserstack-accesskey>" , "localIdentifier": "randomstring"}
By default, BrowserStack local wrappers try downloading and executing the latest version of BrowserStack binary in ~/.browserstack or the present working directory or the tmp folder by order. But you can override these by passing the -binarypath argument. Path to specify local Binary path -
bs_local_args = { "key": "<browserstack-accesskey>" , "binarypath": "/browserstack/BrowserStackLocal"}
To save the logs to the file while running with the '-v' argument, you can specify the path of the file. By default the logs are saved in the local.log file in the present woring directory. To specify the path to file where the logs will be saved -
bs_local_args = { "key": "<browserstack-accesskey>" , "v": "true", "logfile": "/browserstack/logs.txt"}
To run the test suite run, python -m unittest discover
.
You can submit bug reports either in the Github issue tracker.
Before submitting an issue please check if there is already an existing issue. If there is, please add any additional information give it a "+1" in the comments.
When submitting an issue please describe the issue clearly, including how to reproduce the bug, which situations it appears in, what you expect to happen, what actually happens, and what platform (operating system and version) you are using.
We love pull requests! We are very happy to work with you to get your changes merged in, however, please keep the following in mind.
FAQs
Python bindings for Browserstack Local
We found that browserstack-local demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.