pythonbs
A python client for running tests in browserstack
About
This package aims to provide a straighforward python client to interact with browserstack
Pre-requisites
- pythonbs requires Python3 to run
- selenium installed if not
pip3 install selenium
Installation
This client is hosted at PyPi under the name pythonbs, to install it, simply run
pip install pythonbs
Examples
import pythonbs as bs
from selenium import webdriver
def test_bs():
try :
desired_cap = {
'browser': 'Chrome',
'browser_version': '83.0',
'os': 'Windows',
'os_version': '10',
'resolution': '1024x768',
'name': 'Bstack-[Python] Sample Test'
}
username = ''
accesskey = ''
driver = bs.get_webdriver(username,username,desired_cap)
driver.get("http://www.google.com")
if not "Google" in driver.title:
raise Exception("Unable to load google page!")
elem = driver.find_element_by_name("q")
elem.send_keys("BrowserStack")
elem.submit()
print(driver.title)
driver.quit()
except:
driver.close()
driver.quit()
if __name__ == "__main__":
test_bs()
Obtain your username and accesskey values from browserstack settings and Update the values of variable names username & accesskey Run your file and you will see your script run in browserstack
Metadata
Release files for pythonbs 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pythonbs-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for pythonbs-0.0.2-py3-none-any.whl |
Release files / pythonbs-0.0.2-py3-none-any.whl
| Download URL | pythonbs-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44c0c45836374753fb18777e942b71d087c43007c7ae1ffab6d3a515bd683f0c
|
|
BLAKE2b-256 checksum How to use checksums |
0828b70b2fc93a59461547c99f19685ad63b16451a1392d47351e3303d548878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/2.7.12
|
Security for pythonbs 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.