Skip to content

Commit b468066

Browse files
authored
Merge pull request #1131 from quxiaozha/master
Use display_id = 0 as default when no display id provided
2 parents 2050f4b + 2fdf3c8 commit b468066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uiautomator2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def screenshot(self, filename: Optional[str] = None, format="pillow", display_id
8080
jpg_raw = base64.b64decode(base64_data)
8181
pil_img = Image.open(io.BytesIO(jpg_raw))
8282
else:
83-
pil_img = self._dev.screenshot(display_id=display_id)
83+
pil_img = self._dev.screenshot(display_id=0)
8484
else:
8585
pil_img = self._dev.screenshot(display_id=display_id)
8686

@@ -960,4 +960,4 @@ def connect_usb(serial: Optional[str] = None) -> Device:
960960
"""
961961
if not serial:
962962
serial = adbutils.adb.device()
963-
return Device(serial)
963+
return Device(serial)

0 commit comments

Comments
 (0)