dragAndDropToObject doesn’t find the objects

Hello,

The objects (o1,o2) are found. But dragAndDropToObject can’t find them.

o1 = findTestObject(‘Object Repository/Page_Bearbeiten der Kategoriestrukt/Neue Kategorie’)
o2 = findTestObject(‘Object Repository/Page_Bearbeiten der Kategoriestrukt/Droppable Area’)
WebUI.dragAndDropToObject(o1, o2)

 

Error-Message: Unable to drag and drop to object (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Bearbeiten der Kategoriestrukt/Neue Kategorie’ located by ‘By.xpath: //h4[count(. | id(“wrapper”)/div[@class=“content”]/div[@class=“row”]/div[@class=“col-xs-12”]/div[@class=“content-wrapper content-wrapper-m container-fluid”]/div[@class=“panel-content panel”]/div[@class=“panel-body”]/div[@class=“row”]/div[@class=“col-xs-3”]/div[@class=“panel panel-success new-category-panel”]/div[@class=“panel-body”]/div[@class=“dragable”]/ul[@class=“list-category-new list-group”]/li[@class=“list-group-item ui-draggable ui-draggable-handle”]/div[@class=“row”]/div[@class=“col-xs-10”]/div[@class=“row”]/h4[@class=“list-group-item-heading list-category-item-title”]) = count(id(“wrapper”)/div[@class=“content”]/div[@class=“row”]/div[@class=“col-xs-12”]/div[@class=“content-wrapper content-wrapper-m container-fluid”]/div[@class=“panel-content panel”]/div[@class=“panel-body”]/div[@class=“row”]/div[@class=“col-xs-3”]/div[@class=“panel panel-success new-category-panel”]/div[@class=“panel-body”]/div[@class=“dragable”]/ul[@class=“list-category-new list-group”]/li[@class=“list-group-item ui-draggable ui-draggable-handle”]/div[@class=“row”]/div[@class=“col-xs-10”]/div[@class=“row”]/h4[@class=“list-group-item-heading list-category-item-title”])]’ not found)

 

Please, I need a friendly hand.

Necip

Thank’s a lot!

Hi Nguyen, thank you. Which imports do I have to link except:

import com.kms.katalon.core.webui.driver.DriverFactory;

This is the error I get:

Test Cases/testDragDrop1 FAILED because (of) org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/C:/Users/win7inst/Katalon%20Studio/dummy_test/Scripts/testDragDrop1/Script1491980179320.groovy: 25: unable to resolve class WebDriver
@ line 25, column 11.
WebDriver driver = DriverFactory.getWebDriver()

Hi Nguyen, thank you for your fast reply and the example with Robot. Does this mean that I have to develop all my testcases in NetBeans IDE with Robot? Is there no way for a plugin in Katalon which can handle these simple mouse actions?

[ticket reopend]

It seems that my application does not use the DragDrop mechanism. Therefore I have to simulate the mouse events like MouseDown, MouseMove and MouseUp. In the documentation and the forum I found no information about.

Can you give me a hint how to simulate, please?

Hi Vinh Nguyen, thank you for your hint!

I have to test a website written in yii. As you can see the xpath of my application is a bit complex. Maybe this is the problem that the objects are not found.

The objects were in fact not found using findTestObject with xpath, tag or text. But searching only over “class” works.

dragAndDropToObject doesn’t still works.

I think it uses xpath even it is unchecked, so I deleted all items (xpath, tag and text) but “class” AND dragAndDropToObject is working fine!

It seems we found a bug…

[ticked closed (for me)]