Currently I am working on a webpage which has rappid js components. I am trying to achieve dragging and dropping of elements from the palette as seen in the screenshot to the grid. The element I drag from the palette can identified using its model id. The minute I drop the element a copy of it gets created on the grid its model id changes.The id seen in the dom also gets added dynamically. There will be multiple elements on the grid which have the same attributes as seen in the screenshot.
How to find this element uniquely and dynamically?
I have tried using Sikuli, but it doesn't help as there will be multiple similar looking elements. I can get all the elements on the grid using findElements() but no way to compare the recently dropped element. All I am trying to achieve is finding the element uniquely after it is dropped on the grid so that I can further perform operations on it.
Can we reverse the process of finding an element? from the location of the mouse cursor find the element?