2017-12-19 12:11:51 +01:00
|
|
|
/**
|
|
|
|
* Copyright JS Foundation and other contributors, http://js.foundation
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
**/
|
|
|
|
|
2018-01-17 10:50:46 +01:00
|
|
|
var util = require("util");
|
|
|
|
|
|
|
|
var nodePage = require("../../node_page");
|
|
|
|
|
|
|
|
function debugNode(id) {
|
|
|
|
nodePage.call(this, id);
|
2017-12-19 12:11:51 +01:00
|
|
|
}
|
|
|
|
|
2018-01-17 10:50:46 +01:00
|
|
|
util.inherits(debugNode, nodePage);
|
|
|
|
|
2020-01-14 08:56:39 +01:00
|
|
|
debugNode.prototype.setOutput = function (complete) {
|
2018-07-19 06:17:41 +02:00
|
|
|
// Open a payload type list.
|
|
|
|
browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-container")]/button');
|
2018-08-22 07:36:30 +02:00
|
|
|
if (complete !== 'true') {
|
|
|
|
// Select the "msg" type.
|
2019-12-02 04:43:13 +01:00
|
|
|
browser.clickWithWait('//div[contains(@class, "red-ui-typedInput-options")][1]/a[1]');
|
2018-08-22 07:36:30 +02:00
|
|
|
// Input the path in msg.
|
2020-02-25 10:46:02 +01:00
|
|
|
browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-input")]/input');
|
|
|
|
browser.keys(Array('payload'.length).fill('Backspace'));
|
2018-08-22 07:36:30 +02:00
|
|
|
browser.setValue('//*[contains(@class, "red-ui-typedInput-input")]/input', complete);
|
|
|
|
} else {
|
|
|
|
// Select the "complete msg object" type.
|
|
|
|
browser.clickWithWait('/html/body/div[11]/a[2]');
|
2018-07-19 06:17:41 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-17 10:50:46 +01:00
|
|
|
module.exports = debugNode;
|