Skip to content

Commit

Permalink
asdasdasd
Browse files Browse the repository at this point in the history
  • Loading branch information
v-anton committed Mar 9, 2017
1 parent 0df041a commit 289b45e
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 8 deletions.
Binary file modified node_modules/.bin/_mocha
Binary file not shown.
Binary file modified node_modules/.bin/atob
Binary file not shown.
Binary file modified node_modules/.bin/har-validator
Binary file not shown.
Binary file modified node_modules/.bin/mkdirp
Binary file not shown.
Binary file modified node_modules/.bin/mocha
Binary file not shown.
Binary file modified node_modules/.bin/ncp
Binary file not shown.
Binary file modified node_modules/.bin/rimraf
Binary file not shown.
Binary file modified node_modules/.bin/sshpk-conv
Binary file not shown.
Binary file modified node_modules/.bin/sshpk-sign
Binary file not shown.
Binary file modified node_modules/.bin/sshpk-verify
Binary file not shown.
Binary file modified node_modules/.bin/uuid
Binary file not shown.
Binary file modified node_modules/.bin/wdio
Binary file not shown.
Binary file modified server/selenium.jar
Binary file not shown.
60 changes: 55 additions & 5 deletions test/specs/generate.js
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');
});
}
});
});
4 changes: 2 additions & 2 deletions wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ exports.config = {
baseUrl: 'http://localhost',
//
// Default timeout for all waitFor* commands.
waitforTimeout: 10000,
waitforTimeout: 100000,
//
// Default timeout in milliseconds for request
// if Selenium Grid doesn't send response
Expand Down Expand Up @@ -106,7 +106,7 @@ exports.config = {
// Services take over a specific job you don't want to take care of. They enhance
// your test setup with almost no effort. Unlike plugins, they don't add new
// commands. Instead, they hook themselves up into the test process.
services: ['selenium-standalone'],//
// services: ['selenium-standalone'],//
// Framework you want to run your specs with.
// The following are supported: Mocha, Jasmine, and Cucumber
// see also: http://webdriver.io/guide/testrunner/frameworks.html
Expand Down
2 changes: 1 addition & 1 deletion win-start-server.cmd
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

0 comments on commit 289b45e

Please sign in to comment.