Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 950de0a

Browse files
Update README.md
1 parent 5c29465 commit 950de0a

File tree

1 file changed

+55
-5
lines changed

1 file changed

+55
-5
lines changed

‎README.md

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,59 @@
11
# Python-UnitTest-Selenium
2+
![LambdaTest Logo](https://www.lambdatest.com/static/images/logo.svg)
3+
---
24

3-
# Setup
4-
* clone repo https://github.com/LambdaTests/Python-UnitTest-Selenium.git
5-
* run command pip install -r requirements.txt
5+
### Environment Setup
66

7-
# Execution
8-
* run command python lambdatest_test.py
7+
1. Global Dependencies
8+
9+
-Windows
10+
* Download the latest python installer for Windows: http://sourceforge.net/projects/pywin32/files/pywin32/
11+
* Run the installer and follow the setup wizard to install Python
12+
13+
-Linux/Mac
14+
* Run python --version to see which python version is currently installed, make sure it is 2.5.X or above.
15+
* OS X, Ubuntu and most other Linux distro's come with Python pre-installed.
16+
17+
2. Lambdatest Credentials
18+
* Set LambdaTest username and access key in environment variables. It can be obtained from [LambdaTest dashboard](https://automation.lambdatest.com/)
19+
example:
20+
- For linux/mac
21+
```
22+
export LT_USERNAME="YOUR_USERNAME"
23+
export LT_ACCESS_KEY="YOUR ACCESS KEY"
24+
25+
```
26+
- For Windows
27+
```
28+
set LT_USERNAME="YOUR_USERNAME"
29+
set LT_ACCESS_KEY="YOUR ACCESS KEY"
30+
31+
```
32+
3. Setup
33+
* Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
34+
* Navigate to the cloned directory
35+
* Install project dependencies by running command `pip install -r requirements.txt`
36+
37+
4. Running Tests
38+
* To Start Test:
39+
- Navigate to Python-UnitTest-Selenium
40+
- Run following command
41+
* Execution
42+
```
43+
$ python lambdatest_test.py
44+
```
945
46+
##### Routing traffic through your local machine
47+
- Set tunnel value to `true` in test capabilities
48+
> OS specific instructions to download and setup tunnel binary can be found at the following links.
49+
> - [Windows](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Windows)
50+
> - [Mac](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+MacOS)
51+
> - [Linux](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Linux)
52+
53+
### Important Note:
54+
Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
55+
56+
### Resources
57+
58+
##### [SeleniumHQ Documentation](http://www.seleniumhq.org/docs/)
59+
##### [UnitTest Documentation](https://docs.python.org/2/library/unittest.html)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /