How to stabalize drag and drop action


I am doing drag and drop action using the in-built keyword provided by Katalon V8.6.6.
But it does not work always. Many a time, it got failed. I want to stabalize it.
And before doing the drag and drop, I even verified if both the elements are present or not and they are present but still, i am getting this error many a time.


at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(
	at org.openqa.selenium.remote.RemoteWebDriver.execute(
	at com.kms.katalon.selenium.driver.CChromeDriver.execute(
	at org.openqa.selenium.remote.RemoteWebDriver.perform(
	at com.sun.proxy.$Proxy26.perform(Unknown Source)
	at org.openqa.selenium.interactions.Actions$BuiltAction.perform(
	at org.openqa.selenium.interactions.Actions.perform(
	at com.kms.katalon.core.webui.keyword.builtin.DragAndDropToObjectKeyword$_dragAndDropToObject_closure1.doCall(DragAndDropToObjectKeyword.groovy:102)
	at com.kms.katalon.core.webui.keyword.builtin.DragAndDropToObjectKeyword$
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.DragAndDropToObjectKeyword.dragAndDropToObject(DragAndDropToObjectKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.DragAndDropToObjectKeyword.execute(DragAndDropToObjectKeyword.groovy:68)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.dragAndDropToObject(WebUiBuiltInKeywords.groovy:2648)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$dragAndDropToObject$ Source)

Pls help…

Thanks in advance,

1 Like

Hi @hritik, This link might put you on the right path: The click on below + icon is not working properly - #6 by Dave_Evers

Hi @Dave_Evers ,
I have already added the these steps like waitForElementPresent, waitForElementVisible, but still they are failing to drag and drop.
And as i said, it does not happen everytime but most of the time.

is there any other i can achieve the stabalization customizing the keyword or something like that.


Hi @hritik, Please include your HTML code so folks can see what you have done/are dealing with. Remember to use 3 back ticks one line before your HTML code and 3 back ticks one line after your HTML code for easier reading.
Thanks Dave

1 Like

You can read the source of org.openqa.selenium.remote.http.W3CHttpResponseCode class of version 3.141.59, which is bundled in the Katalon Studio v8.6.x and v9.x, at

At around line#122, I found an interesting comment:

      // For now, we'll inelegantly special case unhandled alerts.
      if ("unexpected alert open".equals(error) &&
          HTTP_INTERNAL_ERROR == encodedResponse.getStatus()) {
        String text = "";
        Object data = obj.get("data");
        if (data != null) {
          Object rawText = ((Map<?, ?>) data).get("text");
          if (rawText instanceof String) {
            text = (String) rawText;
        response.setValue(new UnhandledAlertException(message, text));
      } else {
        response.setValue(createException(error, message));

They (Selenium developers) seem not to be very confident in dealing of some special cases.

What is the “special cases” they mean? — I don’t know.


Do you have any idea what is the “special case”? Can you identify any common nature of failing cases?

If you could identify the nature of failure, you might be able to find how to manage it.

I suppose, Selenium WebDriver can not process the response of that negative nature, throws Exception.

I suppose, KS can do nothing for you to make every cases passing.