Skip to content

Dev #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:10

# Create app directory
WORKDIR /var/lib/jenkins/workspace/VFS-MultiEnv/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 8080
CMD [ "node", "Sample.js" ]
Binary file added geckodriver-v0.26.0-win32.zip
Binary file not shown.
74 changes: 74 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
LambdaTest selenium automation sample example
Configuration
----------
username: Username can be found at automation dashboard
accessToken: AccessToken can be generated from automation dashboard or profile section

Result
-------
Execute NodeJS Automation Tests on LambdaTest Distributed Selenium Grid
*/
const webdriver = require('selenium-webdriver');

/*
Setup remote driver
Params
----------
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)
browserName : Supported platform - (chrome, firefox, Internet Explorer, MicrosoftEdge, Safari)
version : Supported list of version can be found at https://www.lambdatest.com/capabilities-generator/
*/

// username: Username can be found at automation dashboard
const USERNAME = 'ajaykorni';

// AccessKey: AccessKey can be generated from automation dashboard or profile section
const KEY = 'ajaykorni';

// gridUrl: gridUrl can be found at automation dashboard
const GRID_HOST = 'facebook.com';

function searchTextOnGoogle() {

// Setup Input capabilities
const capabilities = {
platform: 'ubuntu',
browserName: 'chrome',
version: '67.0',
resolution: '1280x800',
network: true,
visual: true,
console: true,
video: true,
name: 'Test 1', // name of the test
build: 'NodeJS build' // name of the build
}

// URL: https://{username}:{accessToken}@beta-hub.lambdatest.com/wd/hub
const gridUrl = 'https://' + USERNAME + ':' + KEY + '@' + GRID_HOST;

// setup and build selenium driver object
const driver = new webdriver.Builder()
.usingServer(gridUrl)
.withCapabilities(capabilities)
.build();

// navigate to a url, search for a text and get title of page
driver.get('https://www.google.com/ncr').then(function() {
driver.findElement(webdriver.By.name('q')).sendKeys('LambdaTest\n').then(function() {
driver.getTitle().then(function(title) {
setTimeout(function() {
console.log(title);
driver.executeScript('lambda-status=passed');
driver.quit();
}, 5000);
});
});
}).catch(function(err){
console.log("test failed with reason "+err)
driver.executeScript('lambda-status=failed');
driver.quit();
});
}
searchTextOnGoogle();
9 changes: 0 additions & 9 deletions openmrs/DEV.xml

This file was deleted.

Binary file removed openmrs/IEDriverServer.exe
Binary file not shown.
18 changes: 0 additions & 18 deletions openmrs/QA.xml

This file was deleted.

Binary file removed openmrs/chromedriver.exe
Binary file not shown.
Binary file removed openmrs/geckodriver.exe
Binary file not shown.
113 changes: 0 additions & 113 deletions openmrs/pom.xml

This file was deleted.

20 changes: 0 additions & 20 deletions openmrs/src/main/java/org/tq/openmrs/pages/HomePage.java

This file was deleted.

23 changes: 0 additions & 23 deletions openmrs/src/main/java/org/tq/openmrs/pages/LoginPage.java

This file was deleted.

20 changes: 0 additions & 20 deletions openmrs/src/main/java/org/tq/openmrs/pages/LogoutPage.java

This file was deleted.

Loading