Is there a way to press Shift and drag an object in Katalon?

Hi all, I need to choose some objects on map by pressing Shift and drag it to other objects.
Is it possible on Katalon?


1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.


Hi @daria ,

Welcome to our community. You can try it on KS and see if it works as you expect.

Hi, I tried it and it doesn’t work. I search for solutions of this and will be glad if someone can help, thnx.

I haven’t tried but perhaps you can try to use Robot and “drag and drop” keyword together.

So, start Robot and send a keypress of “SHIFT”, do your drag and drop, then use Robot again to do a keyrelease of “SHIFT”.

import java.awt.Robot
import java.awt.event.KeyEvent

Robot robot = new Robot();
//Drag n Drop me to target `<div>` and drop it to the other `<div>`
WebUI.dragAndDropToObject(findTestObject('Drag and Drop/div_draggable'), findTestObject('Drag and Drop/div_droppable'))
1 Like