Trigger rightclick on node using Robot.js

Hi guys

For doing automation test on Gojs, i have created a function for trigger right click on Node and got this error: please help:

public leftClickOnNode(goDiagram, nodeKey: string): void {
        const node = goDiagram.findNodeForKey(nodeKey);
        if (node) {
            const loc = node.location;
            const robot = new Robot(goDiagram);
            // right click on node
            robot.mouseDown(loc.x + 10, loc.y + 10, 0, { right: true });
            robot.mouseUp(loc.x + 10, loc.y + 10, 100, { right: true });
        }
    }

Here 's the error stack trace:

go.js:109 Uncaught TypeError: a.nb is not a function
at z.webpackJsonp.../../../../gojs/release/go.js.z.transform (go.js:109)
at E.webpackJsonp.../../../../gojs/release/go-debug.js.E.transformDocToView.E.cC (go-debug.js:899)
at Robot.webpackJsonp.../../../../gojs/extensionsTS/Robot.ts.Robot.mouseDown (Robot.ts:61)
at GraphModelTestService.webpackJsonp.../../../../../src/app/test/graphmodel/graph-model-test.service.ts.GraphModelTestService.rightClickOnNode (graph-model-test.service.ts:49)
at Object.rightClickOnNode (graph-view.component.ts:119)
at <anonymous>:1:112

Why does your app load both go.js and go-debug.js?

oh, in my app i use go-debug.js in development. but the Robot.ts is loading go.js, I try to change it to import go-debug instead and it works,

thanks Walter.