-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,59 @@ | ||
var assert = require('assert'); | ||
var email ='[email protected]'; | ||
var password = '123456'; | ||
var mainUrl = 'http://hivtest.dev.php.onlini.co/admin/login'; | ||
var suka = 'sssss'; | ||
|
||
describe('webdriver.io page', function() { | ||
it('should have the right title - the fancy generator way', function () { | ||
browser.url('http://webdriver.io'); | ||
var title = browser.getTitle(); | ||
assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs'); | ||
function findElement(selector) { | ||
if (browser.isVisible(selector)) { | ||
return browser.element(selector); | ||
} | ||
else { | ||
findElement(selector); | ||
} | ||
|
||
} | ||
describe('1', function() { | ||
|
||
describe('2', function () { | ||
before(function(){ | ||
browser.url(mainUrl); | ||
browser.setValue('[type="email"]',email); | ||
browser.setValue('[type="password"]',password); | ||
browser.submitForm('[type="submit"]'); | ||
browser.url('http://hivtest.dev.php.onlini.co/admin/doctor/patient/'); | ||
browser.setValue('//*[@id="txtSearch"]', '4550'); | ||
browser.waitForVisible('[data-id="1196d110-54bb-458a-80cb-08df7c0808a9"]'); | ||
browser.click('[data-id="1196d110-54bb-458a-80cb-08df7c0808a9"]'); | ||
}); | ||
for (var i = 1; i < 13; i++) { | ||
|
||
var currentMonth = i.toString(); | ||
it('i', function () { | ||
console.log(i); | ||
currentMonth = currentMonth.toString(); | ||
if (currentMonth.length == 1) { | ||
currentMonth = '0' + currentMonth; | ||
} | ||
var createTestBtn = findElement('[href="http://hivtest.dev.php.onlini.co/admin/doctor/test/new/patient/1196d110-54bb-458a-80cb-08df7c0808a9"]'); | ||
createTestBtn.click(); | ||
var customTypeName = findElement('#test_customTypeName'); | ||
customTypeName.setValue('Das Ergebnis der Analyse'); | ||
console.log(browser.getValue('#test_date')); | ||
console.log(currentMonth); | ||
var currentDate = "2011-" + currentMonth + "-09T13:30:12.000Z"; | ||
browser.execute(function (date) { | ||
$("#test_date").val(date); | ||
}, currentDate); | ||
console.log(browser.getValue('#test_date')); | ||
console.log('pizda'); | ||
var btnAddTestValue = findElement('#btnAddTestValue'); | ||
btnAddTestValue.click(); | ||
var selectbox = findElement('select.form-control'); | ||
selectbox.selectByValue("b1596fe1-5feb-424e-8f4f-f80ead3d4a45"); | ||
browser.addValue('//*[@id="divTestValues"]/div/div[5]/div[2]/div/input', '175'); | ||
browser.click('#test_submit'); | ||
}); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
java -jar -Dwebdriver.chrome.driver=./win/chromedriver/chromedriver.exe ./server/selenium-server-standalone-3.0.1.jar | ||
java -jar -Dwebdriver.chrome.driver=./win/chromedriver/chromedriver.exe ./server/selenium.jar |