forked from tagspaces/tagspaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestdev.js
25 lines (23 loc) · 804 Bytes
/
testdev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var Nightmare = require('nightmare');
var nightmare = Nightmare({show: true});
nightmare
//.goto('http://demo:[email protected]:8000/index.html')
.goto('file:///home/na/TagSpaces/repo/data/index.html') // file:///e:/TagSpaces/repo/data/index.html
.wait(2000)
.click('#selectLocation')
.click('#createNewLocation')
.wait(1000)
.click('#folderLocation')
.type('#folderLocation', '/home/na/TagSpaces')
.type('#connectionName', 'TSDemo')
.click('#createFolderConnectionButton')
.wait(1000)
.evaluate(function () {
console.log("Location name" + document.querySelector("#locationName").textContent);
return document.querySelector("#locationName").textContent === "TSDemo";
})
.end()
.then(function (result) {
console.log("Test result: " + result);
})
nightmare.end()