[1.1.4] [request] ADBScreen: Select one of more devices --- fix build #130 under test

Bug #1804175 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Medium
RaiMan

Bug Description

Hello please help me. I have 2 android emulator but I cannot make the program select the second emulator. I already look at ADBScreen code but it does not include setDevice() that is why I cannot select the second emulator.

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
summary: - [1.1.4] [request] Select another 2nd or another device using ADBScreen
+ [1.1.4] [request] Select one of more devices using ADBScreen
summary: - [1.1.4] [request] Select one of more devices using ADBScreen
+ [1.1.4] [request] ADBScreen: Select one of more devices
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.4] [request] ADBScreen: Select one of more devices

I have added a solution to define an ADBScreen object for an other device than the first in the row, if more than one device/emulator is detected by ADB-support.

Please test and give feedback

adb = ADBScreen.start()
if adb: # check for success
  # now adb is the first device in the row
  adb1 = adb.getScreenWithDevice(1)
  if adb1: # check for success
    # now adb1 should be the second device in the row
    print adb1
    # now you should be able to use adb1
  else:
    print "no device at position 1"
else:
  print "no devices"

If this works, I will add a feature to list the attached emulators/devices

Changed in sikuli:
status: In Progress → Fix Committed
importance: Medium → High
summary: - [1.1.4] [request] ADBScreen: Select one of more devices
+ [1.1.4] [request] ADBScreen: Select one of more devices --- fix build
+ #130 under test
Revision history for this message
johnny doe (edison2214) wrote :

@RaiMan where do I download bro? I try to download here https://raiman.github.io/SikuliX1/downloads.html but it says AttributeError: 'org.sikuli.android.ADBScreen' object has no attribute 'getScreenWithDevice'. I will donate bro if this work.

Revision history for this message
johnny doe (edison2214) wrote :

I found it now bro. I thought I need not change sikulix.jar but only sikulixapi.jar lol.

RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → In Progress
importance: High → Medium
RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Fix Released
milestone: 1.1.4 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.