Appium Запуск тестов параллельно на iOS Android

Доброго времени суток!
Изучаю автоматизацию. Использую Java+maven+Testng.
В testng.xml описываю порядок и условия запуска тестов. Нужно ли для одновременного запуска на разные платформы одинаковых тестов иметь несколько testng.xml ? Или для каждой платформы свой xml файл?

Если все можно проворачивать в одном файле, может кто-то подсказать как это делать или навести примеры.
Спасибо

Можно организовать следующим образом.
Отнесите тесты, которые надо заранить к общей группе, скажем “mobileTests”.
Тогда если будете использовать следующий шаблон в testng.xml - тесты запустятся паралельно на iOS и Android:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite1" verbose="1" parallel="tests" >
    <test name="Android tests" >
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>

    <test name="iOS tests">
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>
</suite>```

Спасибо большое.
Если я правильно понял, то я в каждый тест добавляю в группу в аннотации @Test(groupName)?

Но у меня еще вопрос по вашему ответу. Если у меня несколько девайсов на каждую платформу. Таким образом нужно описать несколько девайсов?

<test name="Android tests" >
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>
<test name="Android tests 2" >
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>
<test name="Android tests 3" >
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>

    <test name="iOS tests">
        <parameter name="" value=""/>
        <groups>
            <run>
                <include name="mobileTests"  />
            </run>
        </groups>
    </test>
</suite>

Ключевым залогом того что тесты будут запускаться параллельно является атрибут parallel=“tests” на уровне . Таким образом все будут запускатся параллельно.
Для решения вопросов с девайсами/платформами советую ознакомится с Selenium Grid.

1 лайк

@Test(groups = “groupName”)

1 лайк

Попробовал сделать по твоему совету, Павел.
TestNg.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default Suite" verbose="1" parallel="tests">
    <test name="Nexus 5X">
        <parameter name="platformName" value="Android"/>
        <parameter name="deviceName" value="Nexus5X"/>
        <parameter name="platformVersion" value="5.1.1"/>
        <parameter name="appPackage" value="co.android"/>
        <parameter name="automationName" value="uiautomator2"/>
        <parameter name="appActivity" value="co.android.splash.GCSplashActivity"/>
        <parameter name="chromedriverExecutable" value="/Library/chromedriver"/>
        <parameter name="udid" value="emulator-5554"/>
        <parameter name="systemPort" value="8200"/>
        <parameter name="ServerURL" value="http://127.0.0.1:4723/wd/hub"/>

        <classes>
            <class name="testClasses.Test"/>
        </classes>
    </test>

    <test name="PixelApi24">
        <parameter name="platformName" value="Android"/>
        <parameter name="deviceName" value="PixelApi24"/>
        <parameter name="platformVersion" value="7.0"/>
        <parameter name="appPackage" value="co.android"/>
        <parameter name="automationName" value="uiautomator2"/>
        <parameter name="appActivity" value="co.android.splash.GCSplashActivity"/>
        <parameter name="chromedriverExecutable" value="/Library/chromedriver"/>
        <parameter name="udid" value="emulator-5556"/>
        <parameter name="systemPort" value="8201"/>
        <parameter name="ServerURL" value="http://127.0.0.1:4733/wd/hub"/>
        <classes>
            <class name="testClasses.Test"/>
        </classes>
    </test>
</suite>

Если не запускать параллельно и только один девайс на каждом из них тест проходит отлично. Но если я запускаю параллельно как указано выше - беда.

Запускаю два сервера на разных портах:
appium --address 127.0.0.1 --port 4723
appium --address 127.0.0.1 --port 4733

и два существующих эмулятора.

При начале выполнения тестов, на обоих эмуляторах отлично запускается приложение, но дальше, после поиска элементов начинаю получать разного рода Exceptions которых небыло до этого.

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

org.openqa.selenium.WebDriverException: Returned value cannot be converted to Boolean: {stacktrace=NoSuchDriverError: A session is either terminated or not started

org.openqa.selenium.StaleElementReferenceException: android.support.test.uiautomator.StaleObjectException

Такое впечатление, что используется один драйвер. Не сталкивался с таким при параллельном ране?

Или для таких вещей мне нужен Selenium Grid?

Давайте уже и код ваших тестов для полноты картины :slight_smile:

1 лайк

а драйвер у вас многопоточний? Покажите код, как Ви драйвер создаете

1 лайк

эм, походу создаю не многопоточный)

public static AppiumDriver driver = null;

public static AppiumDriver getDriver() {
        return driver;
    }

@Parameters({"platformName","deviceName","platformVersion","appPackage","automationName","appActivity","chromedriverExecutable", "ServerURL"})

    @BeforeMethod(alwaysRun = true)
    public void setUp
            (
                    String platformName,
                    String deviceName,
                    String platformVersion,
                    String appPackage,
                    String automationName,
                    String appActivity,
                    String chromedriverExecutable,
                    String serverUrl
            )
            throws Exception
    {
     

        if (platformName.equals("Android")) {
            device = "Android";
            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.setCapability("platformName", platformName);
            capabilities.setCapability("deviceName", deviceName);
            capabilities.setCapability("platformVersion", platformVersion);
            capabilities.setCapability("appPackage", appPackage);
            capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, automationName);
            capabilities.setCapability("appActivity", appActivity);
            capabilities.setCapability("chromedriverExecutable", chromedriverExecutable);
            driver = new AndroidDriver(new URL(serverUrl), capabilities);
           

Именно.
static - делает ваш драйвер общим для всех потоков.
Попробуйте сделать фабрику вебдрайвера, которая будет возвращать новый инстанс вебдрайвера при каждом вызове.
Как то так:

public class AppiumDriverFactory {

    public AppiumDriver getDriver(String device, URL serverUrl, DesiredCapabilities capabilities) {
        if (device.equalsIgnoreCase("android")) {
            return new AndroidDriver(serverUrl, capabilities);
        } else if(device.equalsIgnoreCase("ios")) {
            return new IOSDriver(serverUrl, capabilities);
        } else {
            throw new RuntimeException("Invalid device name");
        }
    }

}

Потом в своем тесте инизиализируйте драйвер вот так:

class MyTest {

    private AppiumDriver driver;
    private DesiredCapabilities capabilities;

    @Parameters({"platformName", "deviceName", "platformVersion", "appPackage", "automationName", "appActivity", "chromedriverExecutable", "ServerURL"})
    @BeforeClass(alwaysRun = true)
    public void setUp(String platformName, String deviceName, String platformVersion, String appPackage, String automationName,
                      String appActivity, String chromedriverExecutable, String serverUrl) throws Exception {
        capabilities = new DesiredCapabilities();
        capabilities.setCapability("platformName", platformName);
        capabilities.setCapability("deviceName", deviceName);
        capabilities.setCapability("platformVersion", platformVersion);
        capabilities.setCapability("appPackage", appPackage);
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, automationName);
        capabilities.setCapability("appActivity", appActivity);
        capabilities.setCapability("chromedriverExecutable", chromedriverExecutable);
        driver = new AppiumDriverFactory().getDriver(deviceName, new URL(serverUrl), capabilities);
    }
    
    @Test
    public void test() {
        driver.findElement(By.xpath("blah blah"));
        // Тело теста
    }
    
    @AfterClass
    public void tearDown() {
        driver.quit();
    }
    
}
1 лайк

Еще лучше было б вынести метод setUp() в другой класс, от которого бы наследовались ваши тестовые классы. Но это уже совсем другая история :slightly_smiling_face:

1 лайк

Спасибо огромное!
Попробовал сделать по вашему совету.
Что-то у меня не выходит.
Ошибка: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8200
Как только тест на одном девайсе проходит, второй фейлит.

Как у меня это все реализовано:
example

AppiumDriverFactory class

public class AppiumDriverFactory {

    @Parameters({"platformName", "deviceName", "platformVersion", "appPackage", "automationName", "appActivity", "chromedriverExecutable", "ServerURL"})

    public AppiumDriver getDriver(String device, URL serverUrl, DesiredCapabilities capabilities) {
        if (device.equalsIgnoreCase("Android")) {
            return new AndroidDriver(serverUrl, capabilities);
        } else if(device.equalsIgnoreCase("ios")) {
            return new IOSDriver(serverUrl, capabilities);
        } else {
            throw new RuntimeException("Invalid device name");
        }
    }
}

BaseSetup class

public class BaseSetup {

    protected AppiumDriver driver;
    private DesiredCapabilities capabilities;

    @Parameters({"platformName", "deviceName", "platformVersion", "appPackage", "automationName", "appActivity", "chromedriverExecutable", "ServerURL"})
    @BeforeMethod(alwaysRun = true)
    public void setUp(String platformName, String deviceName, String platformVersion, String appPackage, String automationName,
                      String appActivity, String chromedriverExecutable, String serverUrl) throws Exception {
        capabilities = new DesiredCapabilities();
        capabilities.setCapability("platformName", platformName);
        capabilities.setCapability("deviceName", deviceName);
        capabilities.setCapability("platformVersion", platformVersion);
        capabilities.setCapability("appPackage", appPackage);
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, automationName);
        capabilities.setCapability("appActivity", appActivity);
        capabilities.setCapability("chromedriverExecutable", chromedriverExecutable);
        driver = new AppiumDriverFactory().getDriver(platformName, new URL(serverUrl), capabilities);
    }
    
    @AfterMethod
    public void tearDown() {
        driver.quit();
    }

}

OnboardingScreen

public class OnboardingScreen extends AbstractScreen {

    public OnboardingScreen(AppiumDriver driver){
        super(driver);
        PageFactory.initElements(new AppiumFieldDecorator(driver), this);
    }

    @AndroidFindBy(id = "co.android:id/btnSignUp")
    public MobileElement signUpBtn;


    public SignUpScreen openSignUpScreen(){
        signUpBtn.click();
        return new SignUpScreen(driver);
    }

AbstractScreen

public abstract class AbstractScreen{

    protected AppiumDriver driver;


    public AbstractScreen(AppiumDriver driver) {
        this.driver = driver;
        PageFactory.initElements(new AppiumFieldDecorator(driver), this);
    }
    
    public static boolean isElementPresent(MobileElement element) {
        try {
            element.isDisplayed();
            return true;
        } catch (org.openqa.selenium.NoSuchElementException e) {
            return false;
        }
    }
}

И сам тест VerifyOnboarding

public class VerifyOnboarding extends BaseSetup {


    @Test
    public void buildTeamTutorial() throws InterruptedException {
        SignUpScreen signUpScreen = new OnboardingScreen(driver).openSignUpScreen();
        Assert.assertTrue(isElementPresent(signUpScreen.signUpStepLabel), "SignUp screen doesn't open");
    }
}

Буду очень признателен за помощь

1 лайк

Тут уже надо смотреть в сторону апиума, слушает ли он на этом порте, запущен ли он вообще и т.д.
Можете скинуть testng.xml, которым вы запускаете тесты, и полный лог запуска?
Также добавьте логи аппиума.

Testng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default Suite" verbose="1" parallel="tests">
    <test name="Nexus 5X">
        <parameter name="platformName" value="Android"/>
        <parameter name="deviceName" value="Nexus5X"/>
        <parameter name="platformVersion" value="5.1.1"/>
        <parameter name="appPackage" value="co.android"/>
        <parameter name="automationName" value="uiautomator2"/>
        <parameter name="appActivity" value="co.android.splash.GCSplashActivity"/>
        <parameter name="chromedriverExecutable" value="/Library/chromedriver"/>
        <parameter name="udid" value="emulator-5554"/>
        <parameter name="systemPort" value="4723"/>
        <parameter name="ServerURL" value="http://127.0.0.1:4723/wd/hub"/>

        <classes>
            <class name="Tests.VerifyOnboarding"/>
        </classes>
    </test>

    <test name="PixelApi24">
        <parameter name="platformName" value="Android"/>
        <parameter name="deviceName" value="PixelApi24"/>
        <parameter name="platformVersion" value="7.0"/>
        <parameter name="appPackage" value="co.android"/>
        <parameter name="automationName" value="uiautomator2"/>
        <parameter name="appActivity" value="co..android.splash.GCSplashActivity"/>
        <parameter name="chromedriverExecutable" value="/Library/chromedriver"/>
        <parameter name="udid" value="emulator-5556"/>
        <parameter name="systemPort" value="4733"/>
        <parameter name="ServerURL" value="http://127.0.0.1:4733/wd/hub"/>

        <classes>
            <class name="Tests.VerifyOnboarding"/>
        </classes>

    </test>
</suite>

Один девайс

[Appium] Welcome to Appium v1.8.1
[Appium] Non-default server args:
[Appium]   address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},"requiredCapabilities":{}},"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},"requiredCapabilities":{}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},{},{"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},"requiredCapabilities":{}}]
[BaseDriver] Event 'newSessionRequested' logged at 1533645668996 (15:41:08 GMT+0300 (EEST))
[Appium] Could not parse W3C capabilities: 'platformName' can't be blank; 'deviceName' can't be blank. Falling back to JSONWP protocol.
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["appPackage","appActivity","chromedriverExecutable","platformVersion","automationName","platformName","deviceName"]. Falling back to JSONWP protocol.
[Appium] Creating new AndroidUiautomator2Driver (v1.12.0) session
[Appium] Capabilities:
[Appium]   appPackage: co.android
[Appium]   appActivity: co.android.splash.GCSplashActivity
[Appium]   chromedriverExecutable: /Library/chromedriver
[Appium]   platformVersion: 5.1.1
[Appium]   automationName: uiautomator2
[Appium]   platformName: Android
[Appium]   deviceName: Nexus5X
[BaseDriver] Creating session with MJSONWP desired capabilities: {"appPackage":"co.good.team...
[BaseDriver] Session created with session id: f89d3fc5-59e8-4220-80ba-63a8d8b5e235
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 2 device(s) connected
[AndroidDriver] Looking for a device with Android '5.1.1'
[ADB] Setting device id to emulator-5556
[ADB] Getting device platform version
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 7.0
[ADB] Setting device id to emulator-5554
[ADB] Getting device platform version
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 5.1.1
[AndroidDriver] Using device: emulator-5554
[ADB] Setting device id to emulator-5554
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 22
[ADB] Device API level: 22
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Getting device platform version
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 5.1.1
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell wm size'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell wm density'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.model'
[ADB] Current device property 'ro.product.model': Android SDK built for x86
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer'
[ADB] Current device property 'ro.product.manufacturer': unknown
[ADB] Device API level: 22
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server'
[ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk
[ADB] Starting '/Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/apksigner' with args 'verify,--print-certs,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk'
[ADB] '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' is already signed.
[ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting '/Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/apksigner' with args 'verify,--print-certs,/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[ADB] '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.uiautomator2.server'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[ADB] The installed 'io.appium.uiautomator2.server' package does not require upgrade ('1.12.0' >= '1.12.0')
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.uiautomator2.server.test'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server.test'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] Cannot read version codes of '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'
[ADB] Cannot read version names of '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'. Assuming correct app version is already installed
[UiAutomator2] Waiting up to 20000ms for instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be available
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[UiAutomator2] Instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' available
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ps'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Device API level: 22
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings put secure mock_location 1'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'undefined' and country: 'undefined'
[Logcat] Starting logcat capture
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Getting install status for io.appium.unlock
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.unlock'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.unlock'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.unlock'
[ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp\:8200 tcp\:6790'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell rm -rf /data/local/tmp/strings.json'
[UiAutomator2] No app capability. Assuming it is already on the device
[ADB] Getting install status for co.android
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages co.android'
[ADB] App is installed
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop co.android'
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear co.android'
[AndroidDriver] Performed fast reset on the installed 'co.android' application (stop and clear)
[ADB] Checking app cert for undefined
[ADB] 'undefined' doesn't exist
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server'
[UiAutomator2] Starting uiautomator2 server 1.12.0
[UiAutomator2] Using UIAutomator2 server from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' and test from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Running command: 'adb -s emulator-5554 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"emulator-5554","deviceUDID":"emulator-5554","deviceScreenSize":"1080x1920","deviceScreenDensity":420,"deviceModel":"Android SDK built for x86","deviceManufacturer":"unknown","deviceApiLevel":22}}
[JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":"Created Session"}
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, 'co.android/co.android.splash.GCSplashActivity'. Starting it ourselves
[ADB] Device API level: 22
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n co.android/co.android.splash.GCSplashActivity -S'
[JSONWP Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/appium/device/pixel_ratio] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":3}"
[JSONWP Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/appium/device/system_bars] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":{\"statusBar\":72}}"
[JSONWP Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/window/current/size] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":{\"height\":1776,\"width\":1080}}"
[Appium] New AndroidUiautomator2Driver session created successfully, session f89d3fc5-59e8-4220-80ba-63a8d8b5e235 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1533645697614 (15:41:37 GMT+0300 (EEST))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"Nexus5X"},"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"5.1.1","automationName":"uiautomator2","platformName":"Android","deviceName":"emulator-5554","deviceUDID":"emulator-5554","deviceScreenSize":"1080x1920","deviceScreenDensity":420,"deviceModel":"Android SDK built for x86","deviceManufacturer":"unknown","deviceApiLevel":22,"pixelRatio":3,"statBarHeight":72,"viewportRect":{"left":0,"top":72,"width":1080,"height":1704}}
[HTTP] <-- POST /wd/hub/session 200 28623 ms - 1080
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts
[HTTP] {"type":"implicit","ms":0}
[W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":0}
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts 400 3 ms - 5348
[HTTP] 
[HTTP] --> GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/context
[HTTP] {}
[W3C] Calling AppiumDriver.getCurrentContext() with args: ["f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/context 200 10 ms - 84
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/elements
[HTTP] {"using":"id","value":"co.android:id/btnSignUp"}
[W3C] Calling AppiumDriver.findElements() with args: ["id","co.android:id/btnSignUp","f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 0 ms for condition
[JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/elements] with body: {"strategy":"id","selector":"co.android:id/btnSignUp","context":"","multiple":true}
[JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":[{"ELEMENT":"cc7eaa00-ae59-4450-8193-6229cce9157f"}]}
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"cc7eaa00-ae59-4450-8193-6229cce9157f"}]
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/elements 200 61 ms - 124
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts
[HTTP] {"type":"implicit","ms":1000}
[W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":1000}
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts 400 5 ms - 5354
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/element/cc7eaa00-ae59-4450-8193-6229cce9157f/click
[HTTP] {"id":"cc7eaa00-ae59-4450-8193-6229cce9157f"}
[W3C] Calling AppiumDriver.click() with args: ["cc7eaa00-ae59-4450-8193-6229cce9157f","f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[JSONWP Proxy] Proxying [POST /element/cc7eaa00-ae59-4450-8193-6229cce9157f/click] to [POST http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/element/cc7eaa00-ae59-4450-8193-6229cce9157f/click] with body: {"element":"cc7eaa00-ae59-4450-8193-6229cce9157f"}
[JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":true}
[MJSONWP] Responding to client with driver.click() result: true
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/element/cc7eaa00-ae59-4450-8193-6229cce9157f/click 200 71 ms - 76
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts
[HTTP] {"type":"implicit","ms":0}
[W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":0}
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts 400 4 ms - 5348
[HTTP] 
[HTTP] --> GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/context
[HTTP] {}
[W3C] Calling AppiumDriver.getCurrentContext() with args: ["f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/context 200 3 ms - 84
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/elements
[HTTP] {"using":"xpath","value":"(//android.widget.LinearLayout/android.widget.TextView)[1]"}
[W3C] Calling AppiumDriver.findElements() with args: ["xpath","(//android.widget.LinearLayout/android.widget.TextView)[1]","f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 0 ms for condition
[JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/elements] with body: {"strategy":"xpath","selector":"(//android.widget.LinearLayout/android.widget.TextView)[1]","context":"","multiple":true}
[JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":[{"ELEMENT":"3a362ecf-10a0-4a6f-af87-5c24cab9b730"}]}
[MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"3a362ecf-10a0-4a6f-af87-5c24cab9b730"}]
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/elements 200 1403 ms - 124
[HTTP] 
[HTTP] --> POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts
[HTTP] {"type":"implicit","ms":1000}
[W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":1000}
[HTTP] <-- POST /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/timeouts 400 4 ms - 5354
[HTTP] 
[HTTP] --> GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/element/3a362ecf-10a0-4a6f-af87-5c24cab9b730/displayed
[HTTP] {}
[W3C] Calling AppiumDriver.elementDisplayed() with args: ["3a362ecf-10a0-4a6f-af87-5c24cab9b730","f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[JSONWP Proxy] Proxying [GET /element/3a362ecf-10a0-4a6f-af87-5c24cab9b730/attribute/displayed] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/element/3a362ecf-10a0-4a6f-af87-5c24cab9b730/attribute/displayed] with body: {}
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":\"true\"}"
[MJSONWP] Responding to client with driver.elementDisplayed() result: true
[HTTP] <-- GET /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235/element/3a362ecf-10a0-4a6f-af87-5c24cab9b730/displayed 200 160 ms - 76
[HTTP] 
[HTTP] --> DELETE /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235
[HTTP] {}
[W3C] Calling AppiumDriver.deleteSession() with args: ["f89d3fc5-59e8-4220-80ba-63a8d8b5e235"]
[BaseDriver] Event 'quitSessionRequested' logged at 1533645710227 (15:41:50 GMT+0300 (EEST))
[Appium] Removing session f89d3fc5-59e8-4220-80ba-63a8d8b5e235 from our master session list
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":\"Session deleted\"}"
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop co.android'
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200 
[ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200'
[BaseDriver] Event 'quitSessionFinished' logged at 1533645711382 (15:41:51 GMT+0300 (EEST))
[MJSONWP] Received response: null
[MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/f89d3fc5-59e8-4220-80ba-63a8d8b5e235 200 1159 ms - 76
[HTTP]

Второй

[Appium] Welcome to Appium v1.8.1
[Appium] Non-default server args:
[Appium]   address: 127.0.0.1
[Appium]   port: 4733
[Appium] Appium REST http interface listener started on 127.0.0.1:4733
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},"requiredCapabilities":{}},"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},"requiredCapabilities":{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},{},{"desiredCapabilities":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},"requiredCapabilities":{}}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1533645669141 (15:41:09 GMT+0300 (EEST))
[Appium] Could not parse W3C capabilities: 'platformName' can't be blank; 'deviceName' can't be blank. Falling back to JSONWP protocol.
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["appPackage","appActivity","chromedriverExecutable","platformVersion","automationName","platformName","deviceName"]. Falling back to JSONWP protocol.
[Appium] Creating new AndroidUiautomator2Driver (v1.12.0) session
[Appium] Capabilities:
[Appium]   appPackage: co.android
[Appium]   appActivity: co.android.splash.GCSplashActivity
[Appium]   chromedriverExecutable: /Library/chromedriver
[Appium]   platformVersion: 7.0
[Appium]   automationName: uiautomator2
[Appium]   platformName: Android
[Appium]   deviceName: PixelApi24
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"appPackage":"co.good.team...
[BaseDriver] Session created with session id: 09a42630-2f19-4653-a40d-ee6d0cfa8aa4
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[ADB] Checking whether adb is present
[ADB] Found 1 'build-tools' folders under '/Users/denysvoskovets/Library/Android/sdk' (newest first):
[ADB]     /Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1
[ADB] Using adb from /Users/denysvoskovets/Library/Android/sdk/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 2 device(s) connected
[AndroidDriver] Looking for a device with Android '7.0'
[debug] [ADB] Setting device id to emulator-5556
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 7.0
[AndroidDriver] Using device: emulator-5556
[debug] [ADB] Setting device id to emulator-5556
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 24
[debug] [ADB] Device API level: 24
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 7.0
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell wm size'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell wm density'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.product.model'
[debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell getprop ro.product.manufacturer'
[debug] [ADB] Current device property 'ro.product.manufacturer': Google
[debug] [ADB] Device API level: 24
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am force-stop io.appium.uiautomator2.server'
[debug] [ADB] Checking app cert for /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk
[ADB] Using apksigner from /Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/apksigner
[debug] [ADB] Starting '/Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/apksigner' with args 'verify,--print-certs,/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk'
[debug] [ADB] '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' is already signed.
[debug] [ADB] Checking app cert for /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting '/Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/apksigner' with args 'verify,--print-certs,/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[debug] [ADB] '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is already signed.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list packages io.appium.uiautomator2.server'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys package io.appium.uiautomator2.server'
[ADB] Checking whether aapt is present
[ADB] Using aapt from /Users/denysvoskovets/Library/Android/sdk/build-tools/26.0.1/aapt
[debug] [ADB] The installed 'io.appium.uiautomator2.server' package does not require upgrade ('1.12.0' >= '1.12.0')
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list packages io.appium.uiautomator2.server.test'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server.test'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] Cannot read version codes of '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'
[ADB] Cannot read version names of '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'. Assuming correct app version is already installed
[debug] [UiAutomator2] Waiting up to 20000ms for instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be available
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' available
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 wait-for-device'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list packages io.appium.settings'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys package io.appium.settings'
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell ps'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Device API level: 24
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell appops set io.appium.settings android\:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list packages io.appium.unlock'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.unlock'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys package io.appium.unlock'
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 forward tcp\:8200 tcp\:6790'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell rm -rf /data/local/tmp/strings.json'
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for co..android
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm list packages co.android'
[debug] [ADB] App is installed
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am force-stop co.android'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell pm clear co.android'
[debug] [AndroidDriver] Performed fast reset on the installed 'co.android' application (stop and clear)
[debug] [ADB] Checking app cert for null
[debug] [ADB] 'null' doesn't exist
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am force-stop io.appium.uiautomator2.server'
[UiAutomator2] Starting uiautomator2 server 1.12.0
[UiAutomator2] Using UIAutomator2 server from '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' and test from '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Running command: 'adb -s emulator-5556 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"emulator-5556","deviceUDID":"emulator-5556","deviceScreenSize":"1080x1920","deviceScreenDensity":480,"deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","deviceApiLevel":24}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":"Created Session"}
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, 'co.android/co.android.splash.GCSplashActivity'. Starting it ourselves
[debug] [ADB] Device API level: 24
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am start -W -n co.android/co.android.splash.GCSplashActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [JSONWP Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/appium/device/pixel_ratio] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":3}"
[debug] [JSONWP Proxy] Proxying [GET /appium/device/system_bars] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/appium/device/system_bars] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":{\"statusBar\":72}}"
[debug] [JSONWP Proxy] Proxying [GET /window/current/size] to [GET http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/window/current/size] with body: {}
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"34ce5299-8071-4696-8db3-1e4fc0409f7f\",\"status\":0,\"value\":{\"height\":1776,\"width\":1080}}"
[Appium] New AndroidUiautomator2Driver session created successfully, session 09a42630-2f19-4653-a40d-ee6d0cfa8aa4 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1533645699364 (15:41:39 GMT+0300 (EEST))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"PixelApi24"},"appPackage":"co.android","appActivity":"co.android.splash.GCSplashActivity","chromedriverExecutable":"/Library/chromedriver","platformVersion":"7.0","automationName":"uiautomator2","platformName":"Android","deviceName":"emulator-5556","deviceUDID":"emulator-5556","deviceScreenSize":"1080x1920","deviceScreenDensity":480,"deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","deviceApiLevel":24,"pixelRatio":3,"statBarHeight":72,"viewportRect":{"left":0,"top":72,"width":1080,"height":1704}}
[HTTP] <-- POST /wd/hub/session 200 30235 ms - 1078
[HTTP] 
[HTTP] --> POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/timeouts
[HTTP] {"type":"implicit","ms":0}
[debug] [W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":0}
[HTTP] <-- POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/timeouts 400 14 ms - 4284
[HTTP] 
[HTTP] --> GET /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/context
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.getCurrentContext() with args: ["09a42630-2f19-4653-a40d-ee6d0cfa8aa4"]
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/context 200 21 ms - 84
[HTTP] 
[HTTP] --> POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/elements
[HTTP] {"using":"id","value":"co.android:id/btnSignUp"}
[debug] [W3C] Calling AppiumDriver.findElements() with args: ["id","co.android:id/btnSignUp","09a42630-2f19-4653-a40d-ee6d0cfa8aa4"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/elements] with body: {"strategy":"id","selector":"co.android:id/btnSignUp","context":"","multiple":true}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"34ce5299-8071-4696-8db3-1e4fc0409f7f","status":0,"value":[]}
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/elements 200 339 ms - 74
[HTTP] 
[HTTP] --> GET /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/context
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.getCurrentContext() with args: ["09a42630-2f19-4653-a40d-ee6d0cfa8aa4"]
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/context 200 5 ms - 84
[HTTP] 
[HTTP] --> POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/elements
[HTTP] {"using":"id","value":"co.android:id/btnSignUp"}
[debug] [W3C] Calling AppiumDriver.findElements() with args: ["id","co.android:id/btnSignUp","09a42630-2f19-4653-a40d-ee6d0cfa8aa4"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f/elements] with body: {"strategy":"id","selector":"co.android:id/btnSignUp","context":"","multiple":true}
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: socket hang up
[MJSONWP]     at JWProxy.proxy$ (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)
[MJSONWP]     at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP]     at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP]     at <anonymous>
[HTTP] <-- POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/elements 500 72 ms - 250
[HTTP] 
[HTTP] --> POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/timeouts
[HTTP] {"type":"implicit","ms":1000}
[debug] [W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":1000}
[HTTP] <-- POST /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4/timeouts 400 18 ms - 4290
[HTTP] 
[HTTP] --> DELETE /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4
[HTTP] {}
[debug] [W3C] Calling AppiumDriver.deleteSession() with args: ["09a42630-2f19-4653-a40d-ee6d0cfa8aa4"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1533645710545 (15:41:50 GMT+0300 (EEST))
[Appium] Removing session 09a42630-2f19-4653-a40d-ee6d0cfa8aa4 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/34ce5299-8071-4696-8db3-1e4fc0409f7f] with no body
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: ProxyRequestError: Could not proxy command to remote server. Original error: Error: socket hang up
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 shell am force-stop co.android'
[debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:.
[debug] [UiAutomator2] [UIAutomator2] Time: 21.328
[debug] [UiAutomator2] [UIAutomator2] OK (1 test)
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200 
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 forward --remove tcp\:8200'
[debug] [ADB] Running '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 forward --remove tcp\:8200'
[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/Users/denysvoskovets/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5556 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1533645712842 (15:41:52 GMT+0300 (EEST))
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[debug] [MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/09a42630-2f19-4653-a40d-ee6d0cfa8aa4 200 2299 ms - 76

Еще лог с среды разработки, пожалуйста

2 лайка

Ваш protected AppiumDriver driver; шарит стейт между потоками. Если parallel testng запускает 2 потока то они не защищенно Вам модифицируют инстанс driver обьекта. ThreadLocal в помощь

1 лайк
Aug 07, 2018 3:41:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 94 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'admins-Mini-4.localdomain', ip: '192.168.3.72', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=co.android, statBarHeight=72, viewportRect={top=72, left=0, width=1080, height=1704}, deviceName=emulator-5556, platform=LINUX, deviceUDID=emulator-5556, chromedriverExecutable=/Library/chromedriver, desired={appPackage=co.android, appActivity=co.android.splash.GCSplashActivity, chromedriverExecutable=/Library/chromedriver, platformVersion=7.0, automationName=uiautomator2, platformName=Android, deviceName=PixelApi24}, platformVersion=7.0, webStorageEnabled=false, automationName=uiautomator2, takesScreenshot=true, javascriptEnabled=true, platformName=Android, deviceManufacturer=Google, deviceApiLevel=24, deviceScreenSize=1080x1920, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, appActivity=co.good.teamwork.android.splash.GCSplashActivity, pixelRatio=3, locationContextEnabled=false, deviceScreenDensity=480, deviceModel=Android SDK built for x86}]
Session ID: 09a42630-2f19-4653-a40d-ee6d0cfa8aa4
*** Element info: {Using=id, value=co.android:id/btnSignUp}

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635)
	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
	at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:393)
	at io.appium.java_client.DefaultGenericMobileDriver.findElements(DefaultGenericMobileDriver.java:48)
	at io.appium.java_client.AppiumDriver.findElements(AppiumDriver.java:195)
	at org.openqa.selenium.remote.RemoteWebDriver.findElementsById(RemoteWebDriver.java:421)
	at io.appium.java_client.DefaultGenericMobileDriver.findElementsById(DefaultGenericMobileDriver.java:60)
	at io.appium.java_client.AppiumDriver.findElementsById(AppiumDriver.java:199)
	at org.openqa.selenium.By$ById.findElements(By.java:210)
	at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:356)
	at io.appium.java_client.DefaultGenericMobileDriver.findElements(DefaultGenericMobileDriver.java:44)
	at io.appium.java_client.AppiumDriver.findElements(AppiumDriver.java:191)
	at io.appium.java_client.pagefactory.bys.ContentMappedBy.findElements(ContentMappedBy.java:36)
	at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:356)
	at io.appium.java_client.DefaultGenericMobileDriver.findElements(DefaultGenericMobileDriver.java:44)
	at io.appium.java_client.AppiumDriver.findElements(AppiumDriver.java:191)
	at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:154)
	at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:1)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
	at io.appium.java_client.pagefactory.AppiumElementLocator.waitFor(AppiumElementLocator.java:88)
	at io.appium.java_client.pagefactory.AppiumElementLocator.findElement(AppiumElementLocator.java:103)
	at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:57)
	at io.appium.java_client.android.AndroidElement$$EnhancerByCGLIB$$c0b591f0.click(<generated>)
	at Screens.OnboardingScreen.openSignUpScreen(OnboardingScreen.java:29)
	at Tests.VerifyOnboarding.buildTeamTutorial(VerifyOnboarding.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
	at org.testng.TestRunner.privateRun(TestRunner.java:773)
	at org.testng.TestRunner.run(TestRunner.java:623)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
	at org.testng.SuiteRunner.access$000(SuiteRunner.java:39)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:391)
	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Спасибо
По ссылке парень добавил в testng.xml параметры “systemPort” для девайсов. У меня это есть.

Пойду читать за ThreadLocal. Спасибо за наводку.

Ничего он не шарит между потоками. Для каждого потока создается новый инстанс драйвера.
ThreadLocal не помешает конечно, но в данном контексте он не решит проблему.