18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

_dragDrop dropping on wrong relational element

bagsmodebagsmode Members
edited September 2012 in Sahi - Open Source
I'm giving the drop item as a _listItem(#) .. the id's on the listItem are dynamically generated, and somehow unique each time. Therefore, I've been trying to figure out how to do this relationally.

When I do the inspection doing the Cntrl-hover to find the "Accessor" of the element, Sahi controller tells me it's _listItem(61). However when I do the _dragDrop, on the page, I find the item was dragged to what Sahi tells me is _listItem(72)! (And btw, I verified that the item is truly 11 li's down.)

What I want to know, is why when I have the call as: _dragDrop(_byId("dragId"), _listItem(61));

Why is this being Dropped to _listItem(72)??

Thanks,
Glenn

Edit: btw, I also have tried to use class names.. I can further qualify the list item via class name:
_listItem("node-target ui-droppable[1]");

However, unlike when using _listItem(61), where I at least see that the element was dropped somewhere, just on the wrong element, this doesn't seem to work at all.
If there's a better way to use the class name information, I'd love to know :)
Sign In or Register to comment.