From 132ceda90790175b2fa0729af00229ec2082ff90 Mon Sep 17 00:00:00 2001 From: Lukasz Fryc Date: Thu, 26 Apr 2018 08:22:11 +0200 Subject: [PATCH] Fix uuid for android emulators --- test/appium/tests/base_test_case.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/appium/tests/base_test_case.py b/test/appium/tests/base_test_case.py index 7b6f951999..fc27df6aaf 100644 --- a/test/appium/tests/base_test_case.py +++ b/test/appium/tests/base_test_case.py @@ -41,10 +41,10 @@ class AbstractTestCase: updated_capabilities = list() raw_out = re.split(r'[\r\\n]+', str(subprocess.check_output(['adb', 'devices'])).rstrip()) for line in raw_out[1:]: - serial = re.findall(r"([\d.\d:]*\d+)", line) + serial = re.findall(r"(([\d.\d:]*\d+)|\bemulator-\d+)", line) if serial: capabilities = self.capabilities_local - capabilities['udid'] = serial[0] + capabilities['udid'] = serial[0][0] updated_capabilities.append(capabilities) return updated_capabilities