I'm trying to use swipe(startx,starty,endx,endy,duration). Once swiping command sent to device, Script is not waiting for the swipe action to be complete. Consider example, i mentioned duration as 3000ms (3 seconds). But Script is moving next line to code once swipe action is injected into the device (not waiting for 3 seconds). Right now To overcome this, I'm using Thread.sleep(). is there any better option to wait until swipe action performed in device