Skip to content

Commit d6447a0

Browse files
authored
Merge pull request #16 from LambdaTest/stage
Stage
2 parents 71ed14e + 406a607 commit d6447a0

File tree

3 files changed

+112
-3
lines changed

3 files changed

+112
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.0.1'

selenium/readme.md

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,110 @@
1-
# lambdatest-sdk
1+
# lambdatest-selenium-driver
2+
[![SmartUI-Testing](https://smartui.lambdatest.com/static/media/LTBadge.64a05e73.svg)](https://smartui.lambdatest.com)
3+
4+
SmartUI SDK for python selenium
5+
- [Installation](#installation)
6+
- [Methods](#methods)
7+
- [Usage](#usage)
8+
9+
## Installation
10+
11+
Install Smart UI cli
12+
13+
```sh-session
14+
$ npm install -g @lambdatest/smartui-cli
15+
```
16+
17+
Install Python Selenium Package
18+
19+
```sh-session
20+
$ pip3 install lambdatest-selenium-driver
21+
```
22+
23+
## Methods
24+
``` python
25+
smartui_snapshot(driver,"Snapshotname")
26+
```
27+
28+
- `driver` (**required**) - A Selenium driver instance is required.
29+
- `name` (**required**) - Name of the screenshot
30+
31+
## Usage
32+
33+
Example selenium test using `smartui_snapshot`
34+
35+
``` python
36+
from lambdatest_selenium_driver import smartui_snapshot
37+
from selenium import webdriver
38+
39+
driver = webdriver.Chrome()
40+
try:
41+
driver.get('https://www.pinterest.com/pin/16958936087791895/')
42+
smartui_snapshot(driver,"Snapshotname")
43+
except Exception as err:
44+
print(err)
45+
finally:
46+
driver.close()
47+
```
48+
49+
50+
Copy the project token from [SmartUI Dashboard](https://smartui.lambdatest.com/) and set on CLI via comman
51+
<b>For Linux/macOS:</b>
52+
53+
```sh-session
54+
export PROJECT_TOKEN="****-****-****-************"
55+
```
56+
57+
<b>For Windows:</b>
58+
59+
```sh-session
60+
set PROJECT_TOKEN="****-****-****-************"
61+
```
62+
63+
Running test
64+
```sh-session
65+
$ npx smartui exec [python test command]
66+
```
67+
This will create new build and upload snapshot to Smart UI Project.
68+
69+
Executing above test
70+
71+
```sh-session
72+
$ npx smartui exec python test.py
73+
✔ Authenticated with SmartUI
74+
→ using project token '******#ihcjks'
75+
✔ SmartUI started
76+
→ listening on port 8080
77+
✔ Fetched git information
78+
→ branch: main, commit: 7e336e6, author: Sushobhit Dua
79+
✔ SmartUI build created
80+
→ build id: ee2cb6c5-9541-494a-9c75-a74629396b80
81+
✔ Execution of 'python3 test.py' completed; exited with code 0
82+
→ INFO:@lambdatest/python-selenium-driver:Snapshot captured name
83+
✔ Finalized build
84+
85+
```
86+
87+
## Contribute
88+
89+
#### Reporting bugs
90+
91+
Our GitHub Issue Tracker will help you log bug reports.
92+
93+
Tips for submitting an issue:
94+
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.
95+
96+
Always provide the steps to reproduce before you submit a bug.
97+
Provide the environment details where you received the issue i.e. Browser Name, Browser Version, Operating System, Screen Resolution and more.
98+
Describe the situation that led to your encounter with bug.
99+
Describe the expected output, and the actual output precisely.
100+
101+
#### Pull Requests
102+
103+
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.
104+
Make sure you stick to coding conventions.
105+
Once you include tests, ensure that they all pass.
106+
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.
107+
108+
## About LambdaTest
109+
110+
[LambdaTest](https://www.lambdatest.com/) 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](https://www.lambdatest.com/selenium-automation) 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.

selenium/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="lambdatest-selenium-driver",
10-
version="1.0.0",
10+
version="1.0.1",
1111
author="LambdaTest <[email protected]>",
1212
description="Python Selenium SDK for testing with Smart UI",
1313
long_description=long_description,

0 commit comments

Comments
 (0)