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 - #5 by walter.