Skip to content

Commit aabbc8b

Browse files
authored
Merge pull request #2 from ajay-aws/dev
Dev
2 parents ac8fdea + b385c3c commit aabbc8b

17 files changed

+630
-474
lines changed

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:10
2+
3+
# Create app directory
4+
WORKDIR /var/lib/jenkins/workspace/VFS-MultiEnv/app
5+
6+
# Install app dependencies
7+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
8+
# where available (npm@5+)
9+
COPY package.json ./
10+
11+
RUN npm install
12+
# If you are building your code for production
13+
# RUN npm ci --only=production
14+
15+
# Bundle app source
16+
COPY . .
17+
18+
EXPOSE 8080
19+
CMD [ "node", "Sample.js" ]

geckodriver-v0.26.0-win32.zip

1.37 MB
Binary file not shown.

index.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
LambdaTest selenium automation sample example
3+
Configuration
4+
----------
5+
username: Username can be found at automation dashboard
6+
accessToken: AccessToken can be generated from automation dashboard or profile section
7+
8+
Result
9+
-------
10+
Execute NodeJS Automation Tests on LambdaTest Distributed Selenium Grid
11+
*/
12+
const webdriver = require('selenium-webdriver');
13+
14+
/*
15+
Setup remote driver
16+
Params
17+
----------
18+
platform : Supported platform - (Windows 10, Windows 8.1, Windows 8, Windows 7, macOS High Sierra, macOS Sierra, OS X El Capitan, OS X Yosemite, OS X Mavericks)
19+
browserName : Supported platform - (chrome, firefox, Internet Explorer, MicrosoftEdge, Safari)
20+
version : Supported list of version can be found at https://www.lambdatest.com/capabilities-generator/
21+
*/
22+
23+
// username: Username can be found at automation dashboard
24+
const USERNAME = 'ajaykorni';
25+
26+
// AccessKey: AccessKey can be generated from automation dashboard or profile section
27+
const KEY = 'ajaykorni';
28+
29+
// gridUrl: gridUrl can be found at automation dashboard
30+
const GRID_HOST = 'facebook.com';
31+
32+
function searchTextOnGoogle() {
33+
34+
// Setup Input capabilities
35+
const capabilities = {
36+
platform: 'ubuntu',
37+
browserName: 'chrome',
38+
version: '67.0',
39+
resolution: '1280x800',
40+
network: true,
41+
visual: true,
42+
console: true,
43+
video: true,
44+
name: 'Test 1', // name of the test
45+
build: 'NodeJS build' // name of the build
46+
}
47+
48+
// URL: https://{username}:{accessToken}@beta-hub.lambdatest.com/wd/hub
49+
const gridUrl = 'https://' + USERNAME + ':' + KEY + '@' + GRID_HOST;
50+
51+
// setup and build selenium driver object
52+
const driver = new webdriver.Builder()
53+
.usingServer(gridUrl)
54+
.withCapabilities(capabilities)
55+
.build();
56+
57+
// navigate to a url, search for a text and get title of page
58+
driver.get('https://www.google.com/ncr').then(function() {
59+
driver.findElement(webdriver.By.name('q')).sendKeys('LambdaTest\n').then(function() {
60+
driver.getTitle().then(function(title) {
61+
setTimeout(function() {
62+
console.log(title);
63+
driver.executeScript('lambda-status=passed');
64+
driver.quit();
65+
}, 5000);
66+
});
67+
});
68+
}).catch(function(err){
69+
console.log("test failed with reason "+err)
70+
driver.executeScript('lambda-status=failed');
71+
driver.quit();
72+
});
73+
}
74+
searchTextOnGoogle();

openmrs/DEV.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

openmrs/IEDriverServer.exe

-3.15 MB
Binary file not shown.

openmrs/QA.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

openmrs/chromedriver.exe

-6.39 MB
Binary file not shown.

openmrs/geckodriver.exe

-12.2 MB
Binary file not shown.

openmrs/pom.xml

Lines changed: 0 additions & 113 deletions
This file was deleted.

openmrs/src/main/java/org/tq/openmrs/pages/HomePage.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

openmrs/src/main/java/org/tq/openmrs/pages/LoginPage.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

openmrs/src/main/java/org/tq/openmrs/pages/LogoutPage.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)