Python Selenium SDK for testing with Smart UI
Project description
lambdatest-selenium-driver
SmartUI SDK for python selenium
Installation
Install Smart UI cli
$ npm install -g @lambdatest/smartui-cli
Install Python Selenium Package
$ pip3 install lambdatest-selenium-driver
Methods
smartui_snapshot(driver,"Snapshotname")
driver
(required) - A Selenium driver instance is required.name
(required) - Name of the screenshot
Usage
Example selenium test using smartui_snapshot
from lambdatest_selenium_driver import smartui_snapshot
from selenium import webdriver
driver = webdriver.Chrome()
try:
driver.get('https://www.pinterest.com/pin/16958936087791895/')
smartui_snapshot(driver,"Snapshotname")
except Exception as err:
print(err)
finally:
driver.close()
Copy the project token from SmartUI Dashboard and set on CLI via comman For Linux/macOS:
export PROJECT_TOKEN="****-****-****-************"
For Windows:
set PROJECT_TOKEN="****-****-****-************"
Running test
$ npx smartui exec [python test command]
This will create new build and upload snapshot to Smart UI Project.
Executing above test
$ npx smartui exec python test.py
✔ Authenticated with SmartUI
→ using project token '******#ihcjks'
✔ SmartUI started
→ listening on port 8080
✔ Fetched git information
→ branch: main, commit: 7e336e6, author: Sushobhit Dua
✔ SmartUI build created
→ build id: ee2cb6c5-9541-494a-9c75-a74629396b80
✔ Execution of 'python3 test.py' completed; exited with code 0
→ INFO:@lambdatest/python-selenium-driver:Snapshot captured name
✔ Finalized build
Contribute
Reporting bugs
Our GitHub Issue Tracker will help you log bug reports.
Tips for submitting an issue: Keep in mind, you don't end up submitting two issues with the same information. Make sure you add a unique input in every issue that you submit. You could also provide a "+1" value in the comments.
Always provide the steps to reproduce before you submit a bug. Provide the environment details where you received the issue i.e. Browser Name, Browser Version, Operating System, Screen Resolution and more. Describe the situation that led to your encounter with bug. Describe the expected output, and the actual output precisely.
Pull Requests
We don't want to pull breaks in case you want to customize your LambdaTest experience. Before you proceed with implementing pull requests, keep in mind the following. Make sure you stick to coding conventions. Once you include tests, ensure that they all pass. Make sure to clean up your Git history, prior your submission of a pull-request. You can do so by using the interactive rebase command for committing and squashing, simultaneously with minor changes + fixes into the corresponding commits.
About LambdaTest
LambdaTest is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your selenium automation testing to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lambdatest-selenium-driver-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5aa3d4c11877df50eef30ba1e70a5c936d3605b74f1908c1a31813855bb8bce |
|
MD5 | b48456bdf0a8ea6870b0216beb8f0faf |
|
BLAKE2b-256 | 9df286aeb46dd45befc1edd699286dba70f50c46057e75dc02cc7bb326e72942 |
Hashes for lambdatest_selenium_driver-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1409b3b92bc8a140f98d4a40061261eb5ed524bb78e5e6cf761d8be1a43f1771 |
|
MD5 | 278c5021451909106bece1b352ff23ee |
|
BLAKE2b-256 | b84c5d95011bdf4d3b939e70f6baa9580f628728984686febebc3894333ed202 |