Can’t find out how to emulate multiple objects selection. For example we got a gallery with pictures (where every picture is an individual test object in Katalon) and I want to select a few of them using Ctrl/Shift + Click. How can I emulate such an action? I’ve tried through the sendKeys function, but seemed to do something wrong.
Would be happy to get any help or example
I am not sure can you emulate the entire action(sending a key combination along with mouse movements) but here’s a headsup for using sendKeys to send value for Ctrl, Shift and Click.
CONTROL = ‘\ue009’
SHIFT = ‘\ue008’
One way of using them would be,
WebElement.sendKeys(Keys.RETURN); //for typing Enter/Return
WebElement.sendKeys(Keys.CONTROL); //for typing Control key
WebElement.sendKeys(Keys.SHIFT); //for typing Shift key.
Source for key implementations can be found at: https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.keys.html
Let’s say you want to emulate a hotkey combination(ALT+SHIFT+Z), you would go something like
String hotKeyCombination = Keys.chord(Keys.ALT, Keys.SHIFT,"Z");
You might have to modify the above code a bit so that Katalon can run it. Let me know how it goes.
Thank you Jait!
Yeah I know how to send keys combination, but can’t understand how to use them along with mouse click.
Yep, was gonna mention. Good luck.
So, in my case a quick solution looks like this: