How to automate the Gojs diagram

how to automate the Gojs diagram part in Telerik/selenium? because i am not able to identify the single object in Gojs diagram page so how i can do automation?.

Does this help?
https://forum.nwoods.com/search?q=selenium

While i’m recording the test, gojs part is not highlighting that is its highlighting whole gojs part in one box(diagram page). I need to highlight the inner elements also like its highlighting other parts so.

Please give me the solution i’m working in telerik.
I want to automate the gojs diagram part with the help of telerik test studio…

That does not sound like a test problem, but like a design problem that the items of a node can not be highlighted.

If you think it is a testing problem, please provide more details so that we can understand your situation.

okay, Thanks for your reply.
when i am recording and playing(telerik test studio tool) in the application then it is not highlighting single element but whole diagram boundary is highlighted, In my application we used gojs diagram its highlighting boundary not inner element, its highlighting other html element .

I want to select the individual elements in that pink box

Ah, it sounds as if you want to select the nodes and links in the diagram. That should work if you are simulating mouse events or touch events at the exact locations of those parts in the diagram.

But if you want to operate on a more abstract level, have you seen the Robot class, demonstrated at http://gojs.net/latest/extensions/Robot.html ?

I have gone the through that link previously which you have sent
I am able to do the drag and drop of element but after that i am not able to hover on that element

I don’t know what you have implemented for the GraphObject.mouseHover event, if anything. But I just tried assigning a tooltip to the node in the template, as follows:

  toolTip: $(go.Adornment, $(go.TextBlock, new go.Binding("text", "key"), { background: "yellow" })),

Then in the code I executed:

    var alpha = myDiagram.findNodeForKey("Alpha");
    if (alpha === null) return;
    var loc = alpha.location;

    // hover over Alpha
    robot.mouseMove(loc.x + 10, loc.y + 10, 0);
    // timestamp must be greater than ToolManager.hoverDelay after the previous one
    robot.mouseMove(loc.x + 10, loc.y + 10, 1000);

And sure enough, after a second, the tooltip appeared.

Is this the kind of behavior you are looking for?

Where i should add code? in testing (coded part) or else in design
In design already code exist.

In testing you want to simulate the mouse moving and then being stationary for long enough.

When iam testing my application using selenium code it showing the following error. please provide me the solution —

Exception in thread “main” org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:“xpath”,“selector”:".//[@id=‘HeaderSeachbox’]"}
(Session info: chrome=56.0.2924.87)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 24 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘2.52.0’, revision: ‘4c2593c’, time: ‘2016-02-11 19:03:33’
System info: host: ‘Richard’, ip: ‘192.168.0.101’, os.name: ‘Windows 8.1’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.7.0_79’
*** Element info: {Using=xpath, value=.//
[@id=‘HeaderSeachbox’]}
Session ID: 6b264d5f6040b702c80254562570f1aa
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=WIN8_1, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\VENKAT~1.BIZ\AppData\Local\Temp\scoped_dir2804_6715, chromedriverVersion=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9)}, networkConnectionEnabled=false, unexpectedAlertBehaviour=, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=56.0.2924.87, pageLoadStrategy=normal, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, hasTouchScreen=false, applicationCacheEnabled=false, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at AutomationFramework.ProjectTest.main(ProjectTest.java:35)

Thanks for providing the error and stack trace, but it does not seem to be involving GoJS at all. So I’m sorry, but I cannot help you – I know nothing about Selenium anyway.

how to identify the HTML canvas element in Telerik Test studio while record and play

@anubhutijain - Did you find any solution to automate it?