Update XPath to the latest

This commit is contained in:
Kazuhito Yokoi 2020-02-17 13:29:06 +09:00
parent e3dab3cf20
commit 42b841cb78
3 changed files with 10 additions and 10 deletions

View File

@ -42,7 +42,7 @@ function addNode(type, x, y) {
} }
} }
browser.waitForVisible('#red-ui-palette-search'); browser.waitForVisible('#red-ui-palette-search');
browser.setValue('//*[@id="red-ui-palette-search"]/div/input', type.replace(/([A-Z])/g,' $1').toLowerCase()); browser.setValue('//*[@id="red-ui-palette-search"]/div/form/input', type.replace(/([A-Z])/g, ' $1').toLowerCase());
browser.pause(300); browser.pause(300);
browser.waitForVisible(palette.getId(type)); browser.waitForVisible(palette.getId(type));
browser.moveToObject(palette.getId(type)); browser.moveToObject(palette.getId(type));
@ -66,8 +66,8 @@ function deleteAllNodes() {
function deploy() { function deploy() {
browser.call(function () { browser.call(function () {
return when.promise(function(resolve, reject) { return when.promise(function (resolve, reject) {
events.on("runtime-event", function(event) { events.on("runtime-event", function (event) {
if (event.id === 'runtime-deploy') { if (event.id === 'runtime-deploy') {
events.removeListener("runtime-event", arguments.callee); events.removeListener("runtime-event", arguments.callee);
resolve(); resolve();

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
**/ **/
var util = require("util"); var util = require('util');
var nodePage = require("../../node_page"); var nodePage = require('../../node_page');
function changeNode(id) { function changeNode(id) {
nodePage.call(this, id); nodePage.call(this, id);
@ -85,7 +85,7 @@ changeNode.prototype.ruleMove = function (p, to, index) {
} }
changeNode.prototype.addRule = function () { changeNode.prototype.addRule = function () {
browser.clickWithWait('//*[@id="dialog-form"]/div[3]/div/a'); browser.clickWithWait('//*[@id="dialog-form"]/div[5]/div/a');
} }
module.exports = changeNode; module.exports = changeNode;

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
**/ **/
var util = require("util"); var util = require('util');
var nodePage = require("../../node_page"); var nodePage = require('../../node_page');
function jsonNode(id) { function jsonNode(id) {
nodePage.call(this, id); nodePage.call(this, id);
@ -28,8 +28,8 @@ jsonNode.prototype.setAction = function (action) {
browser.setValue('node-input-action', action); browser.setValue('node-input-action', action);
} }
jsonNode.prototype.setProperty = function(property) { jsonNode.prototype.setProperty = function (property) {
browser.setValue('//*[@id="dialog-form"]/div[2]/div/div/input', property); browser.setValue('//*[@id="dialog-form"]/div[4]/div/div[1]/input', property);
} }
module.exports = jsonNode; module.exports = jsonNode;