1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Use enter key to open node property instead of double click

This commit is contained in:
Kazuhito Yokoi 2020-01-14 19:24:50 +09:00
parent 530bf22bd5
commit 214d788029

View File

@ -18,21 +18,24 @@ function Node(id) {
this.id = '//*[@id="' + id + '"]';
}
Node.prototype.edit = function() {
browser.clickWithWait(this.id);
browser.clickWithWait(this.id);
Node.prototype.edit = function () {
browser.waitForVisible(this.id);
browser.moveToObject(this.id);
browser.buttonDown();
browser.buttonUp();
browser.keys(['Enter']);
// Wait until an edit dialog opens.
browser.waitForVisible('#node-dialog-ok', 10000);
}
Node.prototype.clickOk = function() {
Node.prototype.clickOk = function () {
browser.clickWithWait('#node-dialog-ok');
// Wait untile an edit dialog closes.
browser.waitForVisible('#node-dialog-ok', 10000, true);
browser.pause(50);
}
Node.prototype.connect = function(targetNode) {
Node.prototype.connect = function (targetNode) {
var outputPort = this.id + '/*[@class="red-ui-flow-port-output"]';
var inputPort = targetNode.id + '/*[@class="red-ui-flow-port-input"]';
browser.dragAndDrop(outputPort, inputPort)