Change If you want to select various elements using the ctrl key:
client.elements(<css selector for your list of elements>, function(err, res) { client .moveTo(res.value[<index of element you want to select>].ELEMENT, 0, 0) .keys('Ctrl')
To select using the shift key, you use the code below (provided that you want to select each element in your list of elements - obviously, you can change the indexes to get a specific subsection of your list of elements). It will move to the upper left of the first element in your list of elements, then left-click, then press the switch key, then it will move to the upper left upper element of the last element, left-click again, and then release the shift key
client.elements(<css selector for your list of elements>, function(err, res) { client .moveTo(res.value[0].ELEMENT, 0, 0) .buttonPress('left') .keys('Shift') .moveTo(res.value[(res.value.length-1)].ELEMENT, 0, 0) .buttonPress('left') .keys('NULL');
source share