0

We are having two Android devices connected to PC at the same time. I want to use wake and drag commands. Till now I was using AndroidViewclient version 3.2, which use to work with monkeyrunner. So these function were easily automated.

Since there is new version of AndroidViewClient (Which is much faster then one latter version), we would like to migrate our scripts.

We have a function which is able to unlock one device. But not working for more than one device. Can you plz help us with same.

Please find the code:

for i in range(len(connected_devices)-1):
    serialno2=connected_devices[i]
    serialno1=connected_devices[i+1]
    device_ref, serialno = ViewClient.connectToDeviceOrExit(serialno1,1)
    device_dut, serialno = ViewClient.connectToDeviceOrExit(serialno2,1)
    myBluetooth.Device_Unlock(device_dut,serialno1)

def Device_Unlock(device,serialno):
#To make device Wake up
device.wake()
device.drag((157,662), (642,1163), 1.0, 120)

We are not sure how to pass serialno to the Device_Unlock function

Prophet
  • 32,350
  • 22
  • 54
  • 79
user3548662
  • 29
  • 1
  • 7
  • I found similar question at link "http://stackoverflow.com/questions/20238844/how-to-connect-multiple-devices-using-androidviewclient", but was not able to reply. Hence opened new Question – user3548662 Jun 20 '14 at 15:22
  • 1
    http://stackoverflow.com/questions/20238844/how-to-connect-multiple-devices-using-androidviewclient%22 answer should work in your case too – Diego Torres Milano Jun 22 '14 at 05:27

0 Answers0