Skip to content

Commit b407806

Browse files
committed
readme restructured
1 parent 47332b3 commit b407806

File tree

5 files changed

+2875
-57
lines changed

5 files changed

+2875
-57
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

+74-41
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,72 @@
1-
# Webdriverio Selenium Sample: Version 4.14.2
2-
[WebdriverIO](http://webdriver.io/) Integration with LambdaTest
3-
4-
![LambdaTest Logo](https://www.lambdatest.com/images/logo.svg)
5-
6-
<img src = "https://webdriver.io/img/webdriverio.png" height = "100">
7-
8-
## Environment Setup
9-
10-
1. Global Dependencies
11-
* Install [Node.js](https://nodejs.org/en/)
12-
* Or Install Node.js with [Homebrew](http://brew.sh/)
13-
```
14-
$ brew install node
15-
```
16-
2. LambdaTest Credentials
17-
* Set LambdaTest username and access key in environment variables. It can be obtained from [LambdaTest dashboard](https://automation.lambdatest.com/)
18-
example:
19-
- For linux/mac
20-
```
21-
export LT_USERNAME="YOUR_USERNAME"
22-
export LT_ACCESS_KEY="YOUR ACCESS KEY"
23-
24-
```
25-
- For Windows
26-
```
27-
set LT_USERNAME="YOUR_USERNAME"
28-
set LT_ACCESS_KEY="YOUR ACCESS KEY"
29-
30-
```
31-
3. Setup
32-
* Clone the repo
33-
* Install dependencies `npm install`
34-
* Update `*.conf.js` files inside the `conf/` directory with your LambdaTest Username and Access Key
35-
36-
## Running your tests
37-
- To run a single test, run `npm run single`
38-
- To run local tests, run `npm run local`
39-
- To run parallel tests, run `npm run parallel`
40-
41-
Know how many concurrent sessions needed by using our [Concurrency Test Calculator](https://www.lambdatest.com/concurrency-calculator?ref=github)
1+
# WebdriverIO Selenium Tutorial: Version 4.14.2
2+
3+
![LAMBDATEST Logo](https://www.lambdatest.com/resources/images/With-WebdriverIO.jpg)
4+
5+
## Prerequisites
6+
7+
1. Install npm.
8+
9+
```
10+
sudo apt install npm
11+
```
12+
13+
2. Install NodeJS.
14+
15+
```
16+
sudo apt install nodejs
17+
```
18+
19+
## Steps to Run your First Test
20+
21+
Step 1. Clone the Webdriverio Selenium Repository.
22+
23+
```
24+
git clone https://github.com/LambdaTest/webdriverio-selenium
25+
```
26+
27+
Step 2. Inside Webdriverio Selenium sample, export the Lambda-test Credentials. You can get these from your automation dashboard.
28+
29+
<p align="center">
30+
<b>For Linux/macOS:</b>
31+
32+
```
33+
export LT_USERNAME="YOUR_USERNAME"
34+
export LT_ACCESS_KEY="YOUR ACCESS KEY"
35+
```
36+
37+
<p align="center">
38+
<b>For Windows:</b>
39+
40+
```
41+
set LT_USERNAME="YOUR_USERNAME"
42+
set LT_ACCESS_KEY="YOUR ACCESS KEY"
43+
```
44+
45+
Step 3. Inside webdriverio-selenium folder install necessary packages.
46+
47+
```
48+
cd webdriverio-selenium
49+
npm i
50+
```
51+
52+
Step 4. To run your First Test.
53+
54+
```
55+
npm run single
56+
```
57+
58+
## See the Results
59+
60+
You can check your test results on the [Automation Dashboard](https://automation.lambdatest.com/build).
61+
![Automation Testing Logs](https://www.lambdatest.com/blog/wp-content/uploads/2020/04/automation-output-nightwatch.png)
62+
63+
## Executing Webdriverio test Parallely.
64+
65+
1. Will use the same test script over different configration to demonstarte parallel testing. Parallel testing with webdriverio will help you to run multiple test cases simultaneously.
66+
67+
```
68+
npm run parallel
69+
```
4270

4371
### Routing traffic through your local machine
4472
- Set tunnel value to `true` in test capabilities
@@ -47,6 +75,10 @@
4775
> - [Mac](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+MacOS)
4876
> - [Linux](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Linux)
4977
78+
### Run test locally
79+
```
80+
npm run local
81+
```
5082
### Important Note:
5183
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".
5284

@@ -60,3 +92,4 @@
6092
## Resources
6193
### [SeleniumHQ Documentation](http://www.seleniumhq.org/docs/)
6294
### [WebdriverIO Documentation](https://webdriver.io/docs/gettingstarted.html)
95+

node_modules/.bin/wdio

+15-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)