DoubleClick on a node in a OrgChart diagram



This is my code in my selenium script.

String NodeName="Managers";
Object count = (Object) 
	    ((JavascriptExecutor) driver).executeScript
	    ("var ct=dgmOrganizationUnit.nodes.count; return ct");
((JavascriptExecutor) driver).executeScript
      ("for(let i = 0; i < +"+count+"; i++) "
	  + "{var key= dgmOrganizationUnit.model.nodeDataArray[i].key;"
	  + "var node = dgmOrganizationUnit.findNodeForKey(key); "
	  + "var ntxt= node.text; if(ntxt==='"+NodeName+"')"
	  + "{;}}");

I am able to select the node in my OrgChart using “.select(x)”. But i would like to do a doubleClick on the selected node named “Managers” and get into a new scenario. Please help.

Anand S


Please format your code so that we can read it.

Have you searched in this forum and across the web for information about using Selenium?


Hi Walter,

I have formatted the code. Please have a look.

Yes, in this forum there was a similar topic posted (URL is below) but solution is regarding the selection of the diagram. We need to select a node and do a double click on it.
How to implement Selenium test cases for canvas.


For example: