Forum Discussion
- HKosovaSmartBear Alumni (Retired)
You can use this function to drag an object to another object:
// JScript
// Drags the source object to the specified destination object
function DragToObject(source, destination) { var point1 = source.WindowToScreen(source.Width/2, source.Height/2); var point2 = destination.WindowToScreen(destination.Width/2, destination.Height/2); source.Drag(source.Width/2, source.Height/2, point2.X - point1.X, point2.Y - point1.Y); }Here's a demo for the http://html5demos.com/drag page:
function DragDropTest() { var strUrl = "http://html5demos.com/drag"; Browsers.Item(btIExplorer).Run(strUrl); var page = Sys.Browser().Page(strUrl); // Drag&drop "two" into the trash bin var item = page.FindChildByXPath("//a[@id='two']"); var trash = page.FindChildByXPath("//div[@id='bin']"); DragToObject(item, trash); }
- VeroniqueluContributor
I found "<a title="" class="jstree-anchor jstree-clicked" href="#"><i class="jstree-icon jstree-themeicon jstree-themeicon-custom" style='background-position: center; background-image: url("/Images/treeView/icon_book_black.png"); background-size: auto;'></i>course1</a>" object
But it says it doesn't support this method..
- AlexKarasChampion Level 3
Hi,
How did you search for the object?
Can you provide us with your actual code, exact line of error and the error text iteself?
Related Content
- 6 years ago
- 3 months ago
- 3 years ago
- 2 years ago
Recent Discussions
- 5 days ago
- 5 days ago
- 8 days ago