TestAutomation of GOJS with selenium


We are in a process of evaluation of replacing SVG canvas with GOJS,but before doing that we have to also check ,GOJS UI testing can be automated with selenium webdriver or not

We observed that following test script which was working on SVG canvas is not working for GOJS, we are not able to perform select,click,drag and drop operation on it. For our UI ,GOJS is embedded with angular.js
I haven’t come across any sample solution recommended on nwood forum for it. I tried the Robot.js solution recommended on forum but not worked for us. http://gojs.net/latest/samples/angular.html simulates my application.for testing, I don’t want to change the state of my application by injecting any of the javascript to simulate it the way user tests it.
Has someone tried to automate gojs UI with selenium.

Following was the script which was working with HTML5 canvas :

WebElement entities = driver.findElement(By.id("paleteCanvas"));
WebElement canvas = driver.findElement(By.id("schemaDiagramCanvas"));
Actions action = new Actions(driver);
action.moveToElement(entities, 40, 30);
action.clickAndHold().moveByOffset(40, 30);
action.moveToElement(entities, 40, 40);
action.moveToElement(canvas, 545, 105);

This is how Sample UI will looks (pallete and canvas)

related topic : Facing challenges to automate goJs canvas with protractor


Several GoJS users have indicated that they were able to do their testing using Selenium. For example: How to implement Selenium test cases for canvas.

Is your problem that you cannot run any tests at all, or that you can only run tests within a diagram, or what?


@bhushan_pawar- Did you find any solution with selenium and go js. I tried your given code but it just click on element and does not move it.