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. Minimal GoJS Sample with AngularJS 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);
action.release();
action.perform();
This is how Sample UI will looks (pallete and canvas)
related topic : Facing challenges to automate goJs canvas with protractor