Giter Club home page Giter Club logo

selenium-jupiter's Introduction

Maven Central Build Status Quality Gate codecov badge-jdk License badge Backers on Open Collective Sponsors on Open Collective Support badge Twitter Follow

Selenium-Jupiter is an open-source Java library that implements a JUnit 5 extension for developing Selenium WebDriver tests. Selenium-Jupiter uses several features of the Jupiter extension (such as parameters resolution, test templates, or conditional test execution). Thanks to this, the resulting Selenium-Jupiter tests follow a minimalist approach (i.e., the required boilerplate code for WebDriver is reduced) while providing a wide range of advanced features for end-to-end testing.

Documentation

You can find the complete documentation of Selenium-Jupiter here. This site contains all the features, examples, and configuration capabilities of Selenium-Jupiter.

Local browsers

Selenium-Jupiter can be used to control local browsers programmatically using Selenium WebDriver. To do that, we need to specify the flavor of the browser to be used by declaring WebDriver parameters in tests or constructors. For instance, we declare a ChromeDriver parameter to use Chrome, FirefoxDriver for Firefox, and so on. For instance:

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;

import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class ChromeTest {

    @Test
    void test(ChromeDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}

Internally, Selenium-Jupiter uses WebDriverManager to manage the WebDriver binaries (i.e., chromedriver, geckodriver, etc.) required to use local browsers.

Browsers in Docker containers

Selenium-Jupiter allows using browsers in Docker containers very easily. The only requirement is to get installed Docker Engine in the machine running the tests. The following example shows a test using this feature. Internally, it pulls the image from Docker Hub, starts the container, and instantiates the WebDriver object to use it. This example also enables the recording of the browser session and remote access using noVNC:

import static io.github.bonigarcia.seljup.BrowserType.CHROME;
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;

import io.github.bonigarcia.seljup.DockerBrowser;
import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class DockerChromeTest {

    @Test
    void testChrome(@DockerBrowser(type = CHROME) WebDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}

Conditional tests

Selenium-Jupiter provides the class-level annotation @EnabledIfBrowserAvailable to skip tests conditionally depending on the availability of local browsers. For example:

import static io.github.bonigarcia.seljup.Browser.SAFARI;
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.safari.SafariDriver;

import io.github.bonigarcia.seljup.EnabledIfBrowserAvailable;
import io.github.bonigarcia.seljup.SeleniumJupiter;

@EnabledIfBrowserAvailable(SAFARI)
@ExtendWith(SeleniumJupiter.class)
class SafariTest {

    @Test
    void test(SafariDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}

Test templates

Test templates are a special kind of test in which the same test logic is executed several times according to some custom data. In Selenium-Jupiter, the data to feed a test template is referred to as the browser scenario (a JSON file by default).

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;

import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class TemplateTest {

    @TestTemplate
    void templateTest(WebDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}

... and the browser scenario is:

{
   "browsers": [
      [
         {
            "type": "chrome-in-docker",
            "version": "latest"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "latest-1"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "beta"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "dev"
         }
      ]
   ]
}

Support

Selenium-Jupiter is part of OpenCollective, an online funding platform for open and transparent communities. You can support the project by contributing as a backer (i.e., a personal donation or recurring contribution) or as a sponsor (i.e., a recurring contribution by a company).

Backers

Sponsors

Alternatively, you can acknowledge my work by buying me a coffee:



About

Selenium-Jupiter (Copyright © 2017-2024) is a project created and maintained by [Boni García] and licensed under the terms of the Apache 2.0 License.

selenium-jupiter's People

Contributors

alan-morey avatar alrega avatar based2 avatar bonigarcia avatar danielfesenmeyer avatar dependabot[bot] avatar garrisontaylor-toast avatar kamkie avatar krzema12 avatar maokejackson avatar marwatk avatar nirgallner avatar sormuras avatar thc202 avatar tyge68 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-jupiter's Issues

Failing to resolve parameters when using Chrome in Docker

I am getting the following error intermittently when trying to run a Chrome browser in Docker on Mac:

[ERROR] ICanLoginAfterFailedAttempt{WebDriver}[1]  Time elapsed: 1.092 s  <<< ERROR!
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.WebDriver arg0] in method [public void ICanLoginAfterFailedAttempt(org.openqa.selenium.WebDriver)]
Caused by: io.github.bonigarcia.seljup.SeleniumJupiterException: io.github.bonigarcia.seljup.SeleniumJupiterException: Exception resolving driver in Docker (CHROME null)
Caused by: io.github.bonigarcia.seljup.SeleniumJupiterException: Exception resolving driver in Docker (CHROME null)
Caused by: com.spotify.docker.client.exceptions.ImageNotFoundException: Image not found: aerokube/selenoid:1.9.1
Caused by: com.spotify.docker.client.exceptions.DockerRequestException: 
Request error: POST unix://localhost:80/containers/create: 404, body: {"message":"No such image: aerokube/selenoid:1.9.1"}

Caused by: javax.ws.rs.NotFoundException: HTTP 404 Not Found

I have my SeleniumExtension setup inside of a base class, so it can easily be reused

public abstract class SeleniumBaseTest {
    @RegisterExtension
    public static SeleniumExtension seleniumExtension = new SeleniumExtension();

    @BeforeAll
    public static void seleniumSetup() {
        seleniumExtension.getConfig().setRecording(true);
        seleniumExtension.getConfig().setAndroidLogging(true);
        seleniumExtension.getConfig().setOutputFolder("surefire-reports");
        seleniumExtension.getConfig().enableScreenshotAtTheEndOfTests();

        seleniumExtension.addBrowsers(BrowserBuilder.chromeInDocker().build());
    }
}

I am using @testtemplate for the actual test

	@TestTemplate
	public void ICanLoginAfterFailedAttempt(WebDriver driver) {
		LoginPage loginPage = new LoginPage(driver);

		loginPage.navigateTo();
		loginPage.logIn("[email protected]", "Nope");
		loginPage.logIn();

		Boolean isVisible = loginPage.isLoginButtonVisible();

		assertFalse(isVisible,
				"Expected the login button to not be visible because the login should have been successful.");
	}

I do not have any configuration setup on how to find these images. It works probably 25% of the time for me right now.

local grid example outputs an enormous amount of useless lines: how to suppress?

from https://bonigarcia.github.io/selenium-jupiter/#remote-browsers I'm playing with the local grid example (complete example: https://github.com/bonigarcia/selenium-jupiter/blob/master/src/test/java/io/github/bonigarcia/test/advance/RemoteWebDriverJupiterTest.java ).

I run it with command
mvn -f pom.xml -Dwdm.gitHubTokenName= -Dwdm.gitHubTokenSecret= -Dwdm.forceCache clean surefire-report:report

It spits out an enormous amount of DEBUG lines that make it hard to see INFO lines or my own println statements. Even when piped to "grep -v DEBUG" there are a lot of other useless lines that are more difficult to grep out.
Is there a way to suppress these lines?
I think this is only selenium-jupiter specific as only this clever example starts local hub and notes from the test code.
I asked this question also in https://groups.google.com/forum/#!forum/selenium-users (but it still needs to be approved by an admin)

Conflict of versions for websocket-clien in the POM of org.seleniumhq.selenium:selenium-server:3.11.0

Require upper bound dependencies error for org.eclipse.jetty.websocket:websocket-client:9.4.7.v20170914 paths to dependency are:
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.eclipse.jetty.websocket:websocket-client:9.4.7.v20170914
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-net.sourceforge.htmlunit:htmlunit:2.29
      +-org.eclipse.jetty.websocket:websocket-client:9.4.8.v20171121

So htmlunit requires websocket-client 9.4.8 but selenium-server requires 9.4.7.

Using generic driver on jenkins problem

Before test I set system property sel.jup.default.browser to chrome, call test

@Test
   void testName(@Arguments("--headless") RemoteWebDriver driver)

but on jenkins it still calls phantomJS.

org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: [[PhantomJSDriver: phantomjs on LINUX (56ee7cc0-a5d4-11e8-97d3-b12e21a7513d)] -> xpath: //a[@tooltip='Back']/i] (tried for 40 second(s) with 500 milliseconds interval)

Chrome is installed on jenkins machine for sure. What can be wrong here? When I run test locally everything works fine. In gradle file I use latest versions of selenium(3.14.0), webdriver manager(2.2.5) and selenium-jupiter(2.2.0) as well in compile and testCompile section.
Tests are run in parallel by gradle, on 2 threads. Driver init log below:

scripts.test2(RemoteWebDriver) STANDARD_ERROR
    Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 28962
    Only local connections are allowed.

scripts.test1(RemoteWebDriver) STANDARD_ERROR
    Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 28258
    Only local connections are allowed.

scripts.test1(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Reading https://api.github.com/repos/mozilla/geckodriver/releases to seek wires, geckodriver

scripts.test2(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Reading https://api.github.com/repos/mozilla/geckodriver/releases to seek wires, geckodriver

scripts.test1 > verifyCommentMentionAudio(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of wires, geckodriver is 0.21.0
    2018-08-22 06:43:37 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.gecko.driver as gradle/drivers/geckodriver/linux64/0.21.0/geckodriver

scripts.test2(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of wires, geckodriver is 0.21.0
    2018-08-22 06:43:37 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:37 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.gecko.driver as gradle/drivers/geckodriver/linux64/0.21.0/geckodriver

scripts.test1(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:38 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of MicrosoftWebDriver is 6.17134
    2018-08-22 06:43:38 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:38 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.edge.driver as gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe

scripts.test1(RemoteWebDriver) STANDARD_ERROR
    /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: 1: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: MZ������@������: not found
    /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: 6: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: Syntax error: "(" unexpected

scripts.test2(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:38 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of MicrosoftWebDriver is 6.17134
    2018-08-22 06:43:38 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:38 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.edge.driver as gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe

scripts.test2(RemoteWebDriver) STANDARD_ERROR
    /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: 1: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: MZ������@������: not found
    /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: 6: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/MicrosoftWebDriver/6.17134/MicrosoftWebDriver.exe: Syntax error: "(" unexpected

scripts.test1(RemoteWebDriver) STANDARD_ERROR
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.os.OsProcess checkForError
    SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)

scripts.test2(RemoteWebDriver) STANDARD_ERROR
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.os.OsProcess checkForError
    SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)

scripts.test1(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Reading https://bitbucket.org/ariya/phantomjs/downloads/ to seek phantomjs

scripts.test2(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Reading https://bitbucket.org/ariya/phantomjs/downloads/ to seek phantomjs
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of phantomjs is 2.1.1
    2018-08-22 06:43:58 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting phantomjs.binary.path as gradle/drivers/phantomjs/linux-x86_64/2.1.1/phantomjs

scripts.test2(RemoteWebDriver) STANDARD_ERROR
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: executable: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/phantomjs/linux-x86_64/2.1.1/phantomjs
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: port: 11403
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: arguments: [--webdriver=11403, --webdriver-logfile=/var/lib/jenkins/workspace/test parallel ui/phantomjsdriver.log]
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: environment: {}

scripts.test1(RemoteWebDriver) STANDARD_OUT
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Latest version of phantomjs is 2.1.1
    2018-08-22 06:43:58 [Test worker] INFO  io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
    2018-08-22 06:43:58 [Test worker] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting phantomjs.binary.path as gradle/drivers/phantomjs/linux-x86_64/2.1.1/phantomjs

scripts.test1(RemoteWebDriver) STANDARD_ERROR
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: executable: /var/lib/jenkins/workspace/test parallel ui/gradle/drivers/phantomjs/linux-x86_64/2.1.1/phantomjs
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: port: 4467
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: arguments: [--webdriver=4467, --webdriver-logfile=/var/lib/jenkins/workspace/test parallel ui/phantomjsdriver.log]
    Aug 22, 2018 6:43:58 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
    INFO: environment: {}
    [INFO  - 2018-08-22T06:43:59.072Z] GhostDriver - Main - running on port 4467

scripts.test2(RemoteWebDriver) STANDARD_ERROR
    [INFO  - 2018-08-22T06:43:59.073Z] GhostDriver - Main - running on port 11403
    [INFO  - 2018-08-22T06:43:59.100Z] Session [bf9aae90-a5d6-11e8-8e4c-3d45d3107b32] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
    [INFO  - 2018-08-22T06:43:59.100Z] Session [bf9aae90-a5d6-11e8-8e4c-3d45d3107b32] - page.customHeaders:  - {}
    [INFO  - 2018-08-22T06:43:59.100Z] Session [bf9aae90-a5d6-11e8-8e4c-3d45d3107b32] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"linux-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
    [INFO  - 2018-08-22T06:43:59.100Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: bf9aae90-a5d6-11e8-8e4c-3d45d3107b32
    Aug 22, 2018 6:43:59 AM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: OSS

java.lang.ClassNotFoundException: org.openqa.selenium.safari.SafariDriver

Hello! Try to use your tool. Example with @DockerBrowser. Environment: Windows 10.
Run test and got exception:
java.lang.NoClassDefFoundError: org/openqa/selenium/safari/SafariDriver
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.safari.SafariDriver.
Could you please help.

Source code:
@testinstance(TestInstance.Lifecycle.PER_CLASS)
@ExtendWith(SeleniumExtension.class)
public class DemoTest {

@BeforeAll
public void beforeAll() {
    System.out.println("before all");
}

@BeforeEach
public void beforeEach() {
    System.out.println("before each");
}

@Test
public void test1(@DockerBrowser(type = CHROME, version = "latest") RemoteWebDriver driver) {
    driver.get("https://google.com");
    System.out.println("test1");
}

@AfterAll
public void afterAll() {
    System.out.println("after all");
}

@AfterEach
public void afterEach() {
    System.out.println("after each");
}

}

java.lang.ClassNotFoundException: org.openqa.selenium.safari.SafariDriver

@bonigarcia Why did you close the issue??? I try to use Chrome, but get this error. I don't understand why this error because it's your code that i coped from the example. And i think you helped me but you have just closed issue.

java.lang.NoClassDefFoundError: org/openqa/selenium/safari/SafariDriver
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.safari.SafariDriver.
Could you please help.

Source code:
@testinstance(TestInstance.Lifecycle.PER_CLASS)
@ExtendWith(SeleniumExtension.class)
public class DemoTest {

@BeforeAll
public void beforeAll() {
System.out.println("before all");
}

@beforeeach
public void beforeEach() {
System.out.println("before each");
}

@test
public void test1(@DockerBrowser(type = CHROME, version = "latest") RemoteWebDriver driver) {
driver.get("https://google.com");
System.out.println("test1");
}

@afterall
public void afterAll() {
System.out.println("after all");
}

@AfterEach
public void afterEach() {
System.out.println("after each");
}

}

Using host as docker network

Hi,
First of all, thanks for a great piece of software. :)

I'm having issue with running tests when I set parameter sel.jup.docker.network=host.
Here is the stacktrace:

13:19:22.840 [main] ERROR io.github.bonigarcia.handler.DockerDriverHandler - Exception resolving driver in Docker (CHROME latest) io.github.bonigarcia.SeleniumJupiterException: Port 4444/tcp is not bindable in container aerokube/selenoid:1.6.2 at io.github.bonigarcia.DockerService.getBindPort(DockerService.java:146) at io.github.bonigarcia.handler.DockerDriverHandler.startSelenoidContainer(DockerDriverHandler.java:551) at io.github.bonigarcia.handler.DockerDriverHandler.startDockerBrowser(DockerDriverHandler.java:480) at io.github.bonigarcia.handler.DockerDriverHandler.getDriverForBrowser(DockerDriverHandler.java:192) at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:156) at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:138) at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:81) at io.github.bonigarcia.SeleniumExtension.resolveParameter(SeleniumExtension.java:201) at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207) at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174) at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170) at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:112) at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120)

Do you have any clue how to resolve this?

Apache debug logs cluttering the terminal

I updated to the latest release (3.1.1), but now I'm seeing A TON of Apache debug logs fill up the terminal when I run my tests. Attached is a small sample of what I see. Can this debug logging be turned off?

Screen Shot 2019-03-13 at 11 06 44 AM

It is impossible to set a value of DriverCapabilities as boolean with @DriverCapabilities annotation

I wanna test using multiple DriverCapabilities like below.
( client : selenium-jupiter, remote-server: selenoid docker(for chrome, for firefox), selenoid binary(for ie)

public class BookMiddleSeleniumTest {

    @DriverUrl
    String url = "http://selenoid:4444/wd/hub";

    @Test
    @Tag("selenium")
    void testRequestForMobileWithSingleResultQueryAtRemoteIE(
            @DriverUrl("http://selenoid:4445/wd/hub")
            @DriverCapabilities("browserName=internet explorer")
                    RemoteWebDriver explorerDriver) {
        testMobileSearchBookResult(explorerDriver);
    }

    @Test
    @Tag("selenium")
    void testRequestForMobileWithSingleResultQueryAtRemoteChrome(
            @DriverCapabilities({"browserName=chrome", "enableVNC=true", "screenResolution=1920x1080x24"})
                    RemoteWebDriver chromeDriver) {
        testMobileSearchBookResult(chromeDriver);
    }

    @Test
    @Tag("selenium")
    void testRequestForMobileWithSingleResultQueryAtRemoteFirefoxDriver(
            @DriverCapabilities({"browserName=firefox", "enableVNC=true", "screenResolution=1920x1080x24"})
                    RemoteWebDriver firefoxDriver) {
        testMobileSearchBookResult(firefoxDriver);
    }

But you know, @DriverCapabilities annotation process all the parameters as String.
So "enableVNC=true" dosen't work propery, because of an exception 'Caused by: io.github.bonigarcia.SeleniumJupiterException: org.openqa.selenium.WebDriverException: json: cannot unmarshal string into Go struct field Caps.enableVNC of type bool'

There is one way( as far as I know ) to add a boolean value in capability, like below.

@DriverCapabilities
    DesiredCapabilities capabilities = new DesiredCapabilities();
    {
        capabilities.setCapability("browserName", "chrome");
        capabilities.setCapability("enableVNC", true);
    }

But It is impossible to use multiple with small change(e.g. change only 'browserName')...
And

sel.jup.vnc=true
sel.jup.vnc.screen.resolution=1920x1080x24
sel.jup.vnc.create.redirect.html.page=true
sel.jup.recording=true
sel.jup.recording.video.screen.size=1024x768
sel.jup.recording.video.frame.rate=12

in selenium-jupiter.properties are not available when I use not a DockerBrowser but a RemoteWebDriver. But There(The guide) was no mention of it.

Am I correct ? or is there some way to add a boolean value in DriverCapabilities?
If It is not, I think "enableVNC=true" should be parsed as <string, boolean> pair automatically.

Thanks for reading !

@Options annotation is ignored when there is a superclass

Looks like there is a missing if (!out.isPresent()) condition here:
https://github.com/bonigarcia/selenium-jupiter/blob/master/src/main/java/io/github/bonigarcia/AnnotationsReader.java#L147

which causes the @Options below to get ignored.

public class TestBase {
}

public class TestFoo extends TestBase {

    @Options
    ChromeOptions chromeOptions = new ChromeOptions();
    {
        chromeOptions.addArguments("--start-maximized");
    }

    @Test
    public void test(ChromeDriver webDriver) throws InterruptedException {
        webDriver.get("http://www.google.com");
        Thread.sleep(5000);
    }
}

Only one screenshot created at the end of tests with `@SingleSession` enabled

When using tests with @SingleSession enabled only one screenshot is saved for each test class - for sel.jup.screenshot.at.the.end.of.tests equal to true or whenfailure.

Parameters I used for running my tests:

sel.jup.screenshot.at.the.end.of.tests=true
sel.jup.screenshot.format=png
sel.jup.output.folder=/tmp

The driver instance is injected via a test class constructor.

The above options work fine when @SingleSession is disabled.

TestTemplate occurs `NumberFormatException` when test by gradle task.

browsers.json

{
  "browsers": [
    [
      {
        "type": "internet explorer",
        "version": "11.0",
        "url": "http://selenoid-uri"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "8.0",
        "url": "http://selenoid-uri"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "9.0",
        "url": "http://selenoid-uri"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "10.0",
        "url": "http://selenoid-uri"
      }
    ]
  ]
}

Test java

    @TestTemplate
    @Tag("selenium")
    void testBookSearchAtTemplateIE(RemoteWebDriver webDriver) throws Exception {
        WebDriverRunner.setWebDriver(webDriver);
        // Do Test
    }

It works very well when I use IDEA for testing it.
But when I use gradle task for testing it, an Exception is occurred like below.

Failed to resolve parameter [org.openqa.selenium.remote.RemoteWebDriver webDriver] in method [void com.kakaocorp.search.middle.book.selenium.BookMiddleSeleniumTest.testBookSearchAtTemplateIE(org.openqa.selenium.remote.RemoteWebDriver) throws java.lang.Exception]
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.remote.RemoteWebDriver webDriver] in method [void com.kakaocorp.search.middle.book.selenium.BookMiddleSeleniumTest.testBookSearchAtTemplateIE(org.openqa.selenium.remote.RemoteWebDriver) throws java.lang.Exception]
	at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:221)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:170)
	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NumberFormatException: For input string: "webDriver"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at io.github.bonigarcia.seljup.SeleniumExtension.getBrowser(SeleniumExtension.java:255)
	at io.github.bonigarcia.seljup.SeleniumExtension.resolveParameter(SeleniumExtension.java:169)
	at io.github.bonigarcia.seljup.SeleniumExtension$1$1.resolveParameter(SeleniumExtension.java:531)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207)

It seems try to parse a parameter name of "webDriver" which is used in @TestTemplate T/C as Integer.
my gradle version is 5.1.1, And I use parallel test in JUnit 5.3.2.
Other tests(Injection RemoteWebDriver without TestTemplate) are works well except @TestTemplate even when I use gradle task for testing.

Thanks in advance !

Error when trying to resolve ChromeDriver

-------------------------------------------------------------------------------
Test set: com.next.Hello
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.926 s <<< FAILURE! - in com.next.Hello
t2{ChromeDriver}  Time elapsed: 0.321 s  <<< ERROR!
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.chrome.ChromeDriver arg0] in method [public final void com.next.Hello.t2(org.openqa.selenium.chrome.ChromeDriver)]
Caused by: io.github.bonigarcia.SeleniumJupiterException: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html

Here's my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.next</groupId>
    <artifactId>automation-base</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>com.next automation-base</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <kotlin.version>1.3.10</kotlin.version>
        <kotlin.code.style>official</kotlin.code.style>
        <junit.version>5.3.1</junit.version>
        <selenium-jupiter.version>2.2.0</selenium-jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit5</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>selenium-jupiter</artifactId>
            <version>${selenium-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <excludes>
                        <exclude/>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

And the tests:

// Hello.kt
@ExtendWith(SeleniumExtension::class)
@Execution(ExecutionMode.CONCURRENT)
class Hello {

    @Test
    fun t1(driver: ChromeDriver) {
        Thread.sleep(5000)
        println("T1: $this")
    }

    @Test
    fun t2(driver: ChromeDriver) {
        println("T2: $this")
    }
}

Add possibility to capture log files from Android

Reason

Having Android logs is additional advantage.

Improvement

Add 2 parameters to selenium-jupiter.properties file:

# if true Android and Appium log files will be written into ${sel.jup.android.logs.folder} directory
# It's "./logs/android" by default
sel.jup.android.logging=false
# directory with Android logs relative to ${sel.jup.output.folder}
# The most interesting files are:
# - appium.log contains Appium server log
# - docker-android.stdout.log may contain information why Android emulator fails to start
sel.jup.android.logs.folder=./logs/android

The following files will be captured into directory ./logs/android/uuuu-MM-dd--hh-mm-ss when sel.jup.android.logging=true:

adb-utils.stderr.log
adb-utils.stdout.log
android-screen-mirror.stderr.log
android-screen-mirror.stdout.log
appium.log
docker-android.stderr.log
docker-android.stdout.log
novnc.stderr.log
novnc.stdout.log
openbox.stderr.log
openbox.stdout.log
port-forward-stderr---supervisor-5LDKxE.log
port-forward-stdout---supervisor-GdULLe.log
supervisord.log
video-recording.stderr.log
video-recording.stdout.log
x11vnc.stderr.log
x11vnc.stdout.log
xvfb.stderr.log
xvfb.stdout.log

Headless Firefox/Chrome with Selenium Grid

Hi,

Is there a way to specify Headless Firefox/Chrome with Selenium Grid using selenium-jupiter?

Here is my code, using the latest stable selenium-jupiter with Java 8. The problem is I don't know how to specify to the grid to use a headless browser for testChromeGrid and testFirefoxGrid.

package roadshow;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;

import io.github.bonigarcia.Arguments;
import io.github.bonigarcia.DriverCapabilities;
import io.github.bonigarcia.DriverUrl;
import io.github.bonigarcia.SeleniumExtension;
import io.github.bonigarcia.wdm.WebDriverManager;

@ExtendWith(SeleniumExtension.class)
public class TestGoogleIT {
	
	@DriverUrl
    private static final String url = "http://localhost:4444/wd/hub";

	@BeforeAll
	public static void setUp() {
		WebDriverManager.chromedriver().setup();
	}
	
    @Test
    public void testHeadlessChrome(@Arguments("--headless") ChromeDriver driver) {
    	performTest(driver);
    }
    
    @Test
    public void testChrome(ChromeDriver driver) {
    	performTest(driver);
    }
    
    @Test
    public void testChromeGrid(@DriverCapabilities("browserName=chrome") RemoteWebDriver driver) {
    	performTest(driver);
    }
    
    @Test
    public void testFirefoxGrid(@DriverCapabilities("browserName=firefox") RemoteWebDriver driver) {
    	performTest(driver);
    }
    
    private void performTest(WebDriver wd) {
    	wd.get("https://www.google.com");
    }
}

Screenshots using generic driver are named "null.png"

When using the generic driver, the screenshot is named "null.png".

Enable screenshots:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <configuration>
    <systemPropertyVariables> . 
      <sel.jup.screenshot.at.the.end.of.tests>true</sel.jup.screenshot.at.the.end.of.tests>
      <sel.jup.screenshot.format>png</sel.jup.screenshot.format>
      <sel.jup.default.browser>chrome</sel.jup.default.browser>
      </systemPropertyVariables>
  </configuration>
</plugin>

Run test:

@Test
void genericTest(WebDriver driver) {
    driver.get("https://bonigarcia.github.io/selenium-jupiter/");
}

Result:

% ls -l
-rw-r--r--   1 user  staff  281433 Oct 29 13:41 null.png

Expected result:
Something like genericTest_arg0_ChromeDriver_bb4ff34453b67a8e0210a86a7082f73f.png

selenium-jupiter version: 2.2.1-SNAPSHOT

docker-android does not work on OS X: Android device not ready: Could not access the Package Manager

Hi Boni,
selenium-jupiter using docker chrome and firefox works on my OS X.
But docker android fails:
I tried butomo1989/docker-android-arm-7.0:0.9-p5 and also the default 7.1.1.

it seems to fail on:
DockerDriverHandler - Android device not ready: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager. Is the system running?'; Code: '1'

These arm emulators are very slow. Why aren't the x86 emulators used on OSX and Windows?

I think the adb command "...shell pm list packages com.android.chrome" maybe should start later?

I accessed the running container with docker command and ran ps auxwf to see the processes running in it.

I figured out the vnc url:
docker ps:
0.0.0.0:32788->6080/tcp
http://localhost:32788/vnc.html and connect with password selenoid
and I took a screenshot: the android device is shown but its screen is only showing "android". (And the Appium Server window is spitting out log lines)

in the vm with
cat /var/log/supervisor/appium.log
I could see those lines too and the last meaningful line was:

[Chromedriver] Error: Failed to start Chromedriver session: An operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds

At https://github.com/butomo1989/docker-android I read that to run these images on OS X one should have to run them in a vm in which docker would run, on Parallels Pro or Vmware Fusion. The Parallels trial is no Pro and with Vmware Fusion I was not able to start the vm created by docker-machine create command.
Then I tried Virtualbox but that does not provide nested virtualization in the vm which is required by the butomo1989/docker-android-x86-8.1 container to run the android emulator. (https://www.virtualbox.org/ticket/4032 : 9 years and virtualbox still lacks this feature)

Paralles Pro and Vmware Fusion are supposed to have nested virtualization but the Fusion no longer works since I installed Virtualbox. I might uninstall Virtualbox but no guarantee that the changes that virtualbox did on my macbook pro OS X, will have been undone.

But I am not into docker technology, I am supposed to learn web automation skills and I would like to be able to test web sites with docker android in selenium-jupiter on my OS X.

setup() {
SeleniumJupiter.config().setVnc(true);
SeleniumJupiter.config().setAndroidDeviceTimeoutSec(600); //increased from the default 200

public void testAndroid(
           @DockerBrowser(type = ANDROID, version = "7.0", deviceName = "Samsung Galaxy S6", browserName = "chrome") RemoteWebDriver driver) throws InterruptedException {
         // somewhere I read that someone had more luck with api 24 but that was with boot2docker I think

which I run with maven command:
mvn -f pom.xml -Dwdm.gitHubTokenName=DieterRogiest -Dwdm.gitHubTokenSecret=<mytoken> -Dwdm.forceCache clean surefire-report:report

And it fails with output:

15:44:04.036 [main] INFO io.github.bonigarcia.handler.DockerDriverHandler - Using Android version 7.0 (API level 24)
15:44:04.639 [main] INFO io.github.bonigarcia.DockerService - Starting Docker container butomo1989/docker-android-arm-7.0:0.9-p5
15:44:04.642 [main] DEBUG com.spotify.docker.client.DefaultDockerClient - Creating container with ContainerConfig: ...
15:44:04.832 [main] INFO com.spotify.docker.client.DefaultDockerClient - Starting container with Id: 5cab0343e7f7a084e5e96f0f471ba6ae259a18e6924158947068abf6d2dc4c92
15:44:05.323 [main] INFO io.github.bonigarcia.handler.DockerDriverHandler - Appium URL in Android device: http://localhost:32789/wd/hub
15:44:05.323 [main] INFO io.github.bonigarcia.handler.DockerDriverHandler - Android device name: Samsung Galaxy S6 -- Browser in Android device: chrome
15:44:05.323 [main] INFO io.github.bonigarcia.handler.DockerDriverHandler - Waiting for Android device ... this might take long, please wait (retries each 5 seconds)
15:44:05.552 [main] DEBUG io.github.bonigarcia.handler.DockerDriverHandler - Android device not ready: \n not found: limit=0 content=…
15:44:10.569 [main] DEBUG io.github.bonigarcia.handler.DockerDriverHandler - Android device not ready: \n not found: limit=0 content=…
15:45:21.009 [main] DEBUG io.github.bonigarcia.handler.DockerDriverHandler - Android device not ready: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
...
15:54:01.679 [main] DEBUG io.github.bonigarcia.handler.DockerDriverHandler - Android device not ready: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell wm size' timed out after 20000ms'; Stderr: ''; Code: 'null'
15:55:26.814 [main] ERROR io.github.bonigarcia.handler.DockerDriverHandler - Exception resolving driver in Docker (ANDROID 7.0)
io.github.bonigarcia.SeleniumJupiterException: Timeout (600 seconds) waiting for Android device in Docker
...
[ERROR] testAndroid{RemoteWebDriver}  Time elapsed: 689.357 s  <<< ERROR!
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.remote.RemoteWebDriver arg0] in method [public void dockertests.Test4DockerJupiter.testAndroid(org.openqa.selenium.remote.RemoteWebDriver) throws java.lang.InterruptedException]
Caused by: io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: Timeout (600 seconds) waiting for Android device in Docker
Caused by: io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: Timeout (600 seconds) waiting for Android device in Docker
Caused by: io.github.bonigarcia.SeleniumJupiterException: Timeout (600 seconds) waiting for Android device in Docker

Can't run with docker on Windows Subsystem for Linux (WSL) when Cisco VPN captures all routes

Our corporate VPN captures all routes so the only way for us to communicate with docker hosts is via port forwarding and localhost connections.

When running tests under Windows proper, selenium-jupiter runs fine:

2019-04-16 10:23:55,949 [main] TRACE io.github.bonigarcia.seljup.handler.DockerDriverHandler 787 - Selenium server URL http://localhost:32804/wd/hub

When running the same code on the same system under WSL (Ubuntu 18.04 in this case) it tries to use the gateway host:

2019-04-16 16:20:06,710 [main] TRACE io.github.bonigarcia.seljup.handler.DockerDriverHandler - Selenium server URL http://172.18.0.1:32802/wd/hub

Looking at the code it seems the culprit is this section:

    public String getHost(String containerId, String network)
            throws DockerException, InterruptedException {
        return IS_OS_LINUX
                ? dockerClient.inspectContainer(containerId).networkSettings()
                        .networks().get(network).gateway()
                : dockerClient.getHost();
    }

When running under WSL it should probably follow the non-Linux path, but it doesn't appear that commons-lang has a lookup specifically for WSL. I'd be happy to write up a patch, but I'm not sure what approach you'd like to take.

I could either write a WSL test and do something like:

        return ( IS_OS_LINUX && !isWSL() )
                ? dockerClient.inspectContainer(containerId).networkSettings()
                        .networks().get(network).gateway()
                : dockerClient.getHost();

Or maybe a configuration parameter that forces the docker host to be a set value:

sel.jup.docker.host: Docker host to use when connecting to Selenium server instead of lookup

I'll start on a PR for the configuration option, as I think it's more robust, but let me know if you want to go the other route.

Conflict of versions for okhttp in the POM of io.github.bonigarcia:selenium-jupiter:2.1.1

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for com.squareup.okhttp3:okhttp:3.9.1 paths to dependency are:
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-io.github.bonigarcia:selenium-jupiter:2.1.1
    +-com.squareup.retrofit2:retrofit:2.4.0
      +-com.squareup.okhttp3:okhttp:3.10.0
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-chrome-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-edge-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-firefox-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-ie-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-opera-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-remote-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-safari-driver:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-support:3.11.0
      +-com.squareup.okhttp3:okhttp:3.9.1

So for ex org.seleniumhq.selenium:selenium-server:3.11.0 says it wants com.squareup.okhttp3:okhttp:3.9.1 but io.github.bonigarcia:selenium-jupiter:2.1.1 transitively requires version 3.10.0 of it.

okhttp version declared in pom.xml seems not correct.

Hi, tried docker browser solution and got few exceptions at the very beginning, the image pull did not start.
The problem in my case was the version of okhttp declared in pom.xml as '3.12.0'.
Looking in dependency tree found that the actual version of okhttp is '3.10.0', which will not work with retrofit 2.5.0 (due to one of the methods changed its signature...).
As far as I understand the '3.12.0' version of okhttp doesn't exist and the earlier one pulled instead (3.10.0).
To fix that I had to exclude okhttp and declare it with the latest version. That solved the issue.
Suppose the latest version of okhttp '3.12.1' should be declared in the pom.xml. Thanks

"internet explorer" couldn't use as 'type' in TestTemplate.

I wanna test several version of IE using @testtemplate with grid selenium environment.
in browsers.json for @testtemplate,
"type" : "internet explorer" occurs an null exception. because there is no Browser for type "internet explorer" but only "iexplorer" in your templateHandlerMap.
So I had no choice, I rewrite all of "internet explorer" in browser.json used by selenoid as "iexplorer".
It makes successfully be connected, But Session had failed with log like below.

in grid (ggr)

2019/01/18 15:21:28 [20] [0.00s] [SESSION_ATTEMPTED] [test] [172.26.113.190] [iexplorer-11.0] [localhost:4446] [-] [1] [-]
2019/01/18 15:21:29 [20] [0.58s] [SESSION_FAILED] [test] [172.26.113.190] [iexplorer-11.0] [localhost:4446] [-] [1] [No matching capability sets found.
Unable to match capability set 0: browserName must be 'internet explorer', but was 'iexplorer']

selenoid

2019/01/18 15:21:28 [6] [LOCATING_SERVICE] [iexplorer] [11.0]
2019/01/18 15:21:28 [6] [USING_DRIVER] [iexplorer] [11.0]
2019/01/18 15:21:28 [6] [ALLOCATING_PORT]
2019/01/18 15:21:28 [6] [ALLOCATED_PORT] [57641]
2019/01/18 15:21:28 [6] [STARTING_PROCESS] [[C:\WebDrivers\IEDriverServer.exe --log-level=DEBUG --port=57641]]
2019/01/18 15:21:29 [6] [PROCESS_STARTED] [20420] [0.51s]
2019/01/18 15:21:29 [6] [PROXY_TO] [http://127.0.0.1:57641]
2019/01/18 15:21:29 [6] [SESSION_ATTEMPTED] [http://127.0.0.1:57641] [1]
2019/01/18 15:21:29 [6] [SESSION_FAILED] [http://127.0.0.1:57641] [500 Internal Server Error]
2019/01/18 15:21:29 [6] [TERMINATING_PROCESS] [20420]
2019/01/18 15:21:29 [6] [TERMINATED_PROCESS] [20420] [0.02s]

When I use "internet explorer" as name of Browser. everything work fine except @testtemplate.
is there something wrong I did ?
I wonder why you use "iexplorer" not "internet explorer" ;(
Please help me !
And thanks in advance. :)

Proxy

We're behind a corporate firewall and have to use a proxy for internet access. When using selenium-jupiter, the WebDriverManager cannot find the webdrivers. Is there a way to configure the use of a proxy for the WebDriverManager?

08:29:23.053 [main] DEBUG io.github.bonigarcia.wdm.WebDriverManager - The proper geckodriver version for your Mozilla Firefox is unknown ... trying with the latest
08:29:23.072 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://api.github.com/repos/mozilla/geckodriver/releases to seek geckodriver
08:29:23.136 [main] WARN io.github.bonigarcia.wdm.WebDriverManager - There was an error managing geckodriver (latest version) (api.github.com) ... trying again using cache and mirror
08:29:23.339 [main] DEBUG io.github.bonigarcia.wdm.WebDriverManager - The proper geckodriver version for your Mozilla Firefox is unknown ... trying with the latest
08:29:23.370 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading http://npm.taobao.org/mirrors/geckodriver to seek geckodriver
08:29:23.370 [main] ERROR io.github.bonigarcia.wdm.WebDriverManager - There was an error managing geckodriver (latest version) (npm.taobao.org)

Combine @TestTemplate with @ParameterizedTest?

Hi Boni,
how can we use Selenium-Jupiter's @testtemplate (to have it run with different browsers) to combine it with @ParameterizedTest (for data driven testing, e.g. try different credentials, defined in a source, on a login page)?

I have not been able to figure it out.
Instead of being able to use Sel-Jup's @testtemplate to configure the browser scenario programmatically (seleniumExtension.addBrowsers and with Webdriver as the parameter type of the method templateTest), I can only make it work with only @ParameterizedTest:

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.aggregator.ArgumentsAccessor;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.extension.RegisterExtension;

import static org.junit.jupiter.params.provider.Arguments.arguments;

import io.github.bonigarcia.SeleniumExtension;

public class TestDDTparamNoTestTemplate {
    @RegisterExtension
    static SeleniumExtension seleniumExtension = new SeleniumExtension();

    @BeforeAll
    static void setup() {
        //to stop geckodriver logging: (this is for firefox, not for firefoxInDocker)
        System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"/dev/null");
    }

    //methodsource with factory method that must generate a stream of arguments:
    static Stream<Arguments> purposeEmailPasswordNameProvider() {
        return Stream.of(
                arguments("Login works", "[email protected]", "Password123!", "Alex"),
                arguments("Incorrect email", "[email protected]", "Password123!", "Alex"),
                arguments("Invalid email", "alexsiminiuc", "Password123!", "Alex")
        );
    }

    //CHROME
    @ParameterizedTest
    @MethodSource("purposeEmailPasswordNameProvider")          // I could also use a @CsvSource or a @CsvFileSource
    void testArgumentAggregMethodSourceChrome(ArgumentsAccessor arguments,ChromeDriver driver) {
        String purpose = arguments.getString(0);
        System.out.println("purpose is: " + purpose);
        User user = new User(arguments.getString(1),
                arguments.getString(2),
                arguments.getString(3));

        testCASE(driver, user, purpose);
    }

    //FIREFOX
    @ParameterizedTest
    @MethodSource("purposeEmailPasswordNameProvider")  
    void testArgumentAggregMethodSourceFirefox(ArgumentsAccessor arguments,FirefoxDriver driver) {
        String purpose = arguments.getString(0);
        System.out.println("purpose is: " + purpose);
        User user = new User(arguments.getString(1),
                arguments.getString(2),
                arguments.getString(3));

        testCASE(driver, user, purpose);
    }

    void testCASE(WebDriver driver, User user, String purpose){
        HomePage homePage = new HomePage(driver);
        homePage.open();
        if (purpose.equals("Login works")) {
        etc.

I will also ask this question at junit5. Boni, are you ok? Maybe as a professor you are too busy to follow up on these issues?

@Options annotation is ignored when @DockerBrowser(type = ANDROID) is used

Problem

@Options annotation is ignored in the following test case.

    @DriverCapabilities
    DesiredCapabilities capabilities = ...

    @Options
    ChromeOptions options = ...

    @BeforeAll
    static void initClass() {
        Config config = SeleniumJupiter.config();
        config.setAndroidDeviceName("Samsung Galaxy S6");
        config.setAndroidDeviceTimeoutSec(1200);
    }

    @Test
    void test(@DockerBrowser(type = ANDROID, version = "7.1.1") RemoteWebDriver driver) {
            driver.get("https://ya.ru");

            WebElement element = driver.findElement(By.tagName("body"));
            Assertions.assertNotNull(element);
            Assertions.assertNotNull(element.getText());
            logger.info("body=" + element.getText());
    }

For the above case options is initialized with the below code, but Chrome browser doesn't take proxy settings into account.

        ChromeOptions options = new ChromeOptions();
        options.addArguments("--disable-translate");

        // Specifying proxy using the dedicated way has no effect for mobile browser
        // options.setProxy(createProxy());

        // http://ipv4-address:port
        options.addArguments("--proxy-server=" + getHttpProxyUrl()); 

        // "127.0.0.1|::1|localhost" => "127.0.0.1,::1,localhost"
        String nonProxyList = getHttpNonProxyList().replace('|', ','); 
        options.addArguments("--proxy-bypass-list=" + nonProxyList);

Reason

Appium is configured without merging @Options and @DriverCapabilities in DockerDriverHandler.getDriverForAndroid()

        DesiredCapabilities capabilities = browser.getCapabilities();
        capabilities.setCapability("browserName", browserName);
        capabilities.setCapability("deviceName", deviceNameCapability);
. . .
                androidDriver = new AndroidDriver<>(new URL(appiumUrl),
                        capabilities);

In the contrary DockerDriverHandler.getDriverForBrowser() calls DockerDriverHandler.getCapabilities() for this purpose.

How to Resolve

Implement the similar logic in DockerDriverHandler.getDriverForAndroid() as well

Headless Chrome argument only works with parameter level @DriverOptions

I am trying to create a test suite with headless chrome test cases only, and I ran into trouble of finding a clean and less verbose solution instead of:

@Test public void headlessTest(@DriverOptions(options = { @Option(name = "args", value = "--headless") }) ChromeDriver driver) { ... }

I was trying to use other ways, but no other seems to add headless property to the driver:

        @DriverOptions
	ChromeOptions chromeOptions = new ChromeOptions();
	{
		chromeOptions.setHeadless(true);
	}
	@Test
	public void headlessTest(ChromeDriver driver) { ... }
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.PARAMETER, ElementType.FIELD })
public @interface ChromeHeadless {

	public Option[] options() default {@Option(name = "args", value = "--headless")} ;
}

Is there a work around for this?

ChromeOptions not picked up using annotations

@ExtendWith(SeleniumExtension::class)
class GoogleTest {
    @DriverCapabilities
    val options = ChromeOptions().apply { setHeadless(true) }

    @Test
    fun `should search for puppies`(driver: ChromeDriver) {
        driver.get("http://www.google.com")
        driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS)
        driver.findElementByName("q").sendKeys("puppies\r\n")
    }
}

This opens a non-headless browser.

DockerBrowsers fail with exceptions - what am I missing here?

First of all, thanks for all the work on this project - it may prove to be of high value for many, many testers out there ..

That said: I've been having trouble with getting docker browsers to work at all.
The guide simply says, that you only have to install docker. I've found that it seems I get further, if I expose docker's daemon TCP socket.
Are there any other configurations of docker, that are necessary, to make docker browsers work?

To start troubleshooting, I've pulled your whole project down, and try to run the tests, but they fail. My JDK is 64 bit, 1.8.0_162; Docker is Version 17.12.0-ce-win47 (15139)

Running the tests in DockerChromeJupiterTest.java gives me the following output; what am I missing here, does anyone know?

2018-03-12 07:53:32 [main] DEBUG i.github.bonigarcia.DockerHubService - Getting browser image list from Docker Hub
2018-03-12 07:53:34 [main] DEBUG i.g.b.handler.DockerDriverHandler - Using Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}, platform: ANY, version: }
2018-03-12 07:53:34 [main] DEBUG i.g.b.handler.DockerDriverHandler - Using CHROME version 65.0 (latest)
2018-03-12 07:53:34 [main] INFO io.github.bonigarcia.DockerService - Pulling Docker image selenoid/vnc:chrome_65.0 ... please wait
2018-03-12 07:54:10 [main] DEBUG io.github.bonigarcia.DockerService - Starting Docker container aerokube/selenoid:1.5.1
2018-03-12 07:54:10 [main] ERROR i.g.b.handler.DockerDriverHandler - Exception resolving org.openqa.selenium.remote.RemoteWebDriver arg0 (CHROME )
com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/1b77817f2a05677ab5f5f97470d051c115733b9e21023d7b93edf4eb5ff4181c/start: 500, body: {"message":"driver failed programming external connectivity on endpoint lucid_ramanujan (69c4525957fb48b70cd1ca274e78982e06c99f9f34a95b0bfae8a227aa8b7ca6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.17.0.2:4444: input/output error"}

at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2663) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:700) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:685) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.startContainer(DefaultDockerClient.java:680) ~[docker-client-8.11.1.jar:8.11.1]
at io.github.bonigarcia.DockerService.startContainer(DockerService.java:141) ~[classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.startSelenoidContainer(DockerDriverHandler.java:355) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.startDockerBrowser(DockerDriverHandler.java:284) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:138) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:116) [classes/:na]
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:80) [classes/:na]
at io.github.bonigarcia.SeleniumExtension.resolveParameter(SeleniumExtension.java:195) [classes/:na]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40) ~[junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:112) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_162]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_162]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_162]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_162]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_162]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_162]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:65) ~[junit5-rt.jar:na]
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) ~[junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) ~[junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) ~[junit-rt.jar:na]

Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210) ~[jersey-client-2.22.2.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_162]

org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.remote.RemoteWebDriver arg0] in executable [public void io.github.bonigarcia.test.docker.DockerChromeJupiterTest.testChrome(org.openqa.selenium.remote.RemoteWebDriver)]

at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:221)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170)
at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:112)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:65)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Caused by: io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/1b77817f2a05677ab5f5f97470d051c115733b9e21023d7b93edf4eb5ff4181c/start: 500, body: {"message":"driver failed programming external connectivity on endpoint lucid_ramanujan (69c4525957fb48b70cd1ca274e78982e06c99f9f34a95b0bfae8a227aa8b7ca6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.17.0.2:4444: input/output error"}

at io.github.bonigarcia.handler.DriverHandler.handleException(DriverHandler.java:99)
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:96)
at io.github.bonigarcia.SeleniumExtension.resolveParameter(SeleniumExtension.java:195)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207)
... 51 more

Caused by: io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/1b77817f2a05677ab5f5f97470d051c115733b9e21023d7b93edf4eb5ff4181c/start: 500, body: {"message":"driver failed programming external connectivity on endpoint lucid_ramanujan (69c4525957fb48b70cd1ca274e78982e06c99f9f34a95b0bfae8a227aa8b7ca6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.17.0.2:4444: input/output error"}

at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:185)
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:116)
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:80)
... 53 more

Caused by: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/1b77817f2a05677ab5f5f97470d051c115733b9e21023d7b93edf4eb5ff4181c/start: 500, body: {"message":"driver failed programming external connectivity on endpoint lucid_ramanujan (69c4525957fb48b70cd1ca274e78982e06c99f9f34a95b0bfae8a227aa8b7ca6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.17.0.2:4444: input/output error"}

at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2663)
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:700)
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:685)
at com.spotify.docker.client.DefaultDockerClient.startContainer(DefaultDockerClient.java:680)
at io.github.bonigarcia.DockerService.startContainer(DockerService.java:141)
at io.github.bonigarcia.handler.DockerDriverHandler.startSelenoidContainer(DockerDriverHandler.java:355)
at io.github.bonigarcia.handler.DockerDriverHandler.startDockerBrowser(DockerDriverHandler.java:284)
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:138)
... 55 more

Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773)
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198)
at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79)
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)

2018-03-12 07:54:10 [main] DEBUG i.g.b.handler.DockerDriverHandler - Using Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}, platform: ANY, version: }
2018-03-12 07:54:10 [main] DEBUG i.g.b.handler.DockerDriverHandler - Using CHROME version 62.0
2018-03-12 07:54:11 [main] DEBUG io.github.bonigarcia.DockerService - Starting Docker container aerokube/selenoid:1.5.1
2018-03-12 07:54:11 [main] ERROR i.g.b.handler.DockerDriverHandler - Exception resolving org.openqa.selenium.remote.RemoteWebDriver arg0 (CHROME 62.0)
com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/c800edf9f971864a1997d83cb062b4eb2f80b28ac91f22feeae4007f4a985a79/start: 500, body: {"message":"driver failed programming external connectivity on endpoint determined_yonath (03f77553fca89e2c8eea4e64ee26249f733c3819160d50b14af88f9403185047): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32857:tcp:172.17.0.2:4444: input/output error"}

at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2663) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:700) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:685) ~[docker-client-8.11.1.jar:8.11.1]
at com.spotify.docker.client.DefaultDockerClient.startContainer(DefaultDockerClient.java:680) ~[docker-client-8.11.1.jar:8.11.1]
at io.github.bonigarcia.DockerService.startContainer(DockerService.java:141) ~[classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.startSelenoidContainer(DockerDriverHandler.java:355) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.startDockerBrowser(DockerDriverHandler.java:284) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:138) [classes/:na]
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:116) [classes/:na]
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:80) [classes/:na]
at io.github.bonigarcia.SeleniumExtension.resolveParameter(SeleniumExtension.java:195) [classes/:na]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40) ~[junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58) [junit-jupiter-engine-5.1.0.jar:5.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:112) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_162]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_162]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_162]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_162]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_162]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_162]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_162]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_162]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_162]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43) ~[junit-platform-engine-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) ~[junit-platform-launcher-1.1.0.jar:1.1.0]
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:65) ~[junit5-rt.jar:na]
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) ~[junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) ~[junit-rt.jar:na]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) ~[junit-rt.jar:na]

Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180) ~[jersey-client-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340) ~[jersey-common-2.22.2.jar:na]
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210) ~[jersey-client-2.22.2.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_162]

org.junit.jupiter.api.extension.ParameterResolutionException: Failed to resolve parameter [org.openqa.selenium.remote.RemoteWebDriver arg0] in executable [public void io.github.bonigarcia.test.docker.DockerChromeJupiterTest.testChromeWithVersion(org.openqa.selenium.remote.RemoteWebDriver)]

at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:221)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:174)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:135)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:116)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170)
at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:112)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:120)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:120)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:65)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Caused by: io.github.bonigarcia.SeleniumJupiterException: io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/c800edf9f971864a1997d83cb062b4eb2f80b28ac91f22feeae4007f4a985a79/start: 500, body: {"message":"driver failed programming external connectivity on endpoint determined_yonath (03f77553fca89e2c8eea4e64ee26249f733c3819160d50b14af88f9403185047): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32857:tcp:172.17.0.2:4444: input/output error"}

at io.github.bonigarcia.handler.DriverHandler.handleException(DriverHandler.java:99)
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:96)
at io.github.bonigarcia.SeleniumExtension.resolveParameter(SeleniumExtension.java:195)
at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:207)
... 51 more

Caused by: io.github.bonigarcia.SeleniumJupiterException: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/c800edf9f971864a1997d83cb062b4eb2f80b28ac91f22feeae4007f4a985a79/start: 500, body: {"message":"driver failed programming external connectivity on endpoint determined_yonath (03f77553fca89e2c8eea4e64ee26249f733c3819160d50b14af88f9403185047): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32857:tcp:172.17.0.2:4444: input/output error"}

at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:185)
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:116)
at io.github.bonigarcia.handler.RemoteDriverHandler.resolve(RemoteDriverHandler.java:80)
... 53 more

Caused by: com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST http://localhost:2375/containers/c800edf9f971864a1997d83cb062b4eb2f80b28ac91f22feeae4007f4a985a79/start: 500, body: {"message":"driver failed programming external connectivity on endpoint determined_yonath (03f77553fca89e2c8eea4e64ee26249f733c3819160d50b14af88f9403185047): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32857:tcp:172.17.0.2:4444: input/output error"}

at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2702)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2663)
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:700)
at com.spotify.docker.client.DefaultDockerClient.containerAction(DefaultDockerClient.java:685)
at com.spotify.docker.client.DefaultDockerClient.startContainer(DefaultDockerClient.java:680)
at io.github.bonigarcia.DockerService.startContainer(DockerService.java:141)
at io.github.bonigarcia.handler.DockerDriverHandler.startSelenoidContainer(DockerDriverHandler.java:355)
at io.github.bonigarcia.handler.DockerDriverHandler.startDockerBrowser(DockerDriverHandler.java:284)
at io.github.bonigarcia.handler.DockerDriverHandler.resolve(DockerDriverHandler.java:138)
... 55 more

Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773)
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198)
at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79)
at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)

Process finished with exit code -1

Allow extending WebDriver passed as parameter in test methods

Hi there,

Thanks for this awesome test framework. I'd like to extend it so that I can write tests like this:

    @Test
    public void test(XWikiWebDriver driver)
    {
        driver.get("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.getTitle(), containsString("JUnit 5 extension for Selenium"));
        driver.findElement(By.linkText("Quick reference")).click();
    }

So I'm trying to provide my own extension that extends SeleniumExtension and that overrides supportsParameter and resolveParameter as follows:

public class XWikiDockerExtension extends SeleniumExtension
{
    @Override
    public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
    {
        Class<?> type = parameterContext.getParameter().getType();
        return XWikiWebDriver.class.isAssignableFrom(type);
    }

    @Override
    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
    {
        RemoteWebDriver webDriver = (RemoteWebDriver) super.resolveParameter(parameterContext, extensionContext);
        return new XWikiWebDriver(webDriver);
    }
}

The problem is that SeleniumExtension.resolveParameter() has the following line:

boolean isGeneric = type.equals(RemoteWebDriver.class) || type.equals(WebDriver.class);

I don't fully understand the code but would it be possible to test that the passed parameter implements RemoteWebDriver or WebDriver instead? (using instanceof)?

That should allow me to extend it nicely ;)

Thanks

Failed tests do not create screenshots if test is annotated with @SingleInstance

If a failed test is annotated with @SingleInstance and is configured to take screenshots when the test fails, then a screenshot should be generated, but is not.

// Run with -Dsel.jup.screenshot.at.the.end.of.tests=whenfailure

@ExtendWith(SeleniumExtension.class)
@SingleSession
@TestInstance(PER_CLASS)
public class FailureCreatesScreenshotTest {
    final Logger log = getLogger(lookup().lookupClass());

    RemoteWebDriver driver;

    public FailureCreatesScreenshotTest(ChromeDriver driver) {
        this.driver = driver;
    }

    @Test
    public void shouldFailAndCreateScreenshot() {
        log.debug("Step 1: {}", driver);
        driver.get("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.getTitle(),
                containsString("Test should fail and create screenshot"));
    }
}

Removing @SingleInstance allows screenshots to be created correctly.

Debugging: In ScreenshotManager.isScreenshotRequired(), executionException is Optional.empty because context is an instance of ClassExtensionException, and therefore the screenshot is not created. When @SingleInstance is removed, then executionException is present, and context is an instance of MethodExtensionContext.

TestTemplate enhancement request.

TestTemplate is an awsome feature of seljup.
But there is no way to put specific capabilities in browsers.json. (currently It looks like support type, version, url only..)
I wanna use it like below.

{
  "browsers": [
    [
      {
        "type": "internet explorer",
        "version": "11.0",
        "url": "http://selenoid:4444"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "8.0",
        "url": "http://selenoid:4444"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "9.0",
        "url": "http://selenoid:4444"
      }
    ],
    [
      {
        "type": "internet explorer",
        "version": "10.0",
        "url": "http://selenoid:4444"
      }
    ],
    [
      {
        "type": "chrome",
        "version": "71.0",
        "url": "http://selenoid:4444",
        "enableVNC": true,
        "screenResolution": "1920x1080x24"
      }
    ],
    [
      {
        "type": "firefox",
        "version": "64.0",
        "url": "http://selenoid:4444",
        "enableVNC": true,
        "screenResolution": "1920x1080x24"
      }
    ]
  ]
}

Have you some plan to support other capabilities in TestTemplate ? :)
I think It will be very useful feature !
Thanks

example mobile emulation feature (with @DriverCapabilities) does not work

Hi,
the example for mobile emulation feature provided out of the box by Chrome with @DriverCapabilities at https://bonigarcia.github.io/selenium-jupiter/#remote-browsers (but it is not for remote-browsers of course) does not work for me:
the chrome browser that appears does not render the web page using small screen resolutions to emulate the smartphone Nexus 5.
I'm on OS X with second latest Chrome browser (in its DevTools clicking on Toggle Device Toolbar opens the UI in a mobile view alright).
Maybe google changed something about it in chromeOptions?

the code for that example is also at:
https://github.com/bonigarcia/selenium-jupiter/blob/master/src/test/java/io/github/bonigarcia/test/advance/ChromeWithGlobalCapabilitiesJupiterTest.java

Parameterize tests with grid nodes

I started using Selenium today and was delighted when I found out about this project. Big 👍! I'm particularly impressed with the documentation. It's much better than so much else I had to read today that was supposed to explain Selenium. 😃

I set up a Selenium grid on my machine and wanted to run each test once per node. As far as I could tell, this is not supported by Selenium Jupiter, right? Template tests seemed to try to launch their own Docker images (which didn't work for some reason).

Since I like JUnit 5 extensions, I decided to write my own little extension that dynamically determines which nodes a grid contains and provides a RemoteWebDriver for each. You can find the code in this snippet - it is not tested and documented, but it works on my machine. 😉

Would you be interested to include this functionality in Selenium Jupiter?

Conflict of versions for javax.servlet-api in the POM of org.seleniumhq.selenium:selenium-server:3.11.0

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for javax.servlet:javax.servlet-api:3.0.1 paths to dependency are:
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-javax.servlet:javax.servlet-api:3.0.1
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:jetty-repacked:9.4.7.v20171121
      +-javax.servlet:javax.servlet-api:3.0.1 (managed) <-- javax.servlet:javax.servlet-api:3.1.0

So jetty-repacked requires a more recent version of the one declared by selenium-server.

junit-jupiter-api dependency scope

Hello.

Why junit-jupiter-api has provided scope? intellij idea doesn't provide this package in classpath.

Provided. For your sources, the dependency is included in the classpath only at the compilation phase. This is useful when there is a container (e.g. a web container of an application server) that provides the corresponding dependency at runtime.
For your test sources, the dependency is included in the classpath both at the build and run phases.

(from https://www.jetbrains.com/help/idea/dependencies.html)

Pull request #15

Run tests with same browser session

Hi,

Currently every test create its webdriver session and once test done, webdriver session ends

But how can I run all tests with same webdriver session

Add ability to specify DriverCapabilities for RemoteWebDriver as a command line parameter

I would like to be able write a single test that uses the generic WebDriver configured to be either local or remote, with the browser specified on the command line. Currently, DriverCapabilities for the remote WebDriver can only be specified in source using something like:

@DriverCapabilities Capabilities capabilities = firefox();

It would be great if this can be externalized as a command line parameter. It may be possible to use the existing parameter sel.jup.default.browser to define the @DriverCapabilities.

For example, for the generic test:

    @Test
    void genericTest(WebDriver driver) {
        driver.get("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.getTitle(),
                containsString("JUnit 5 extension for Selenium"));

    }

I would like to run:

-Dsel.jup.selenium.server.url=http://my-grid:4444/wd/hub -Dsel.jup.default.browser=firefox

This would create a remote webdriver using firefox capabilities. If I didn't specify the arguments, then a local chromedriver would be created.

When DockerDriverHandler stats container with Android, it doesn't pass proxy settings

When DockerDriverHandler stats container with Android, it doesn't initialize environment variables "HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY", "http_proxy", "https_proxy", "no_proxy"

Selenium Jupiter uses https://github.com/butomo1989/docker-android containers with android. According to the documentation environment variables HTTP_PROXY, HTTPS_PROXY, NO_PROXY must be initialized for containers to operate behind proxy.

template-tests with multiple test methods per class do not work

Hi Boni,

I tried template-tests programmatically according https://bonigarcia.github.io/selenium-jupiter/#template-tests.
But in my class I use @testtemplate for multiple test methods:
the first test method happens ok with chrome and firefox
but the second and third method only happen with firefox!
Does this mean that multiple test methods is not supported for @testtemplate?

Running on OS X with maven command.

package testCases;

import pageObjects.home_PG_POF;
import pageObjects.performantie_PG_POF;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.RegisterExtension;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;
import org.openqa.selenium.JavascriptExecutor; // for scrolling
import org.openqa.selenium.firefox.FirefoxDriver;

import io.github.bonigarcia.BrowserBuilder;
import io.github.bonigarcia.BrowsersTemplate.Browser;
import io.github.bonigarcia.SeleniumExtension;

import static org.assertj.core.api.Assertions.*;  // assertThat and more
import static org.assertj.core.api.Assertions.fail;
import org.assertj.core.api.SoftAssertions;

public class Test3TemplateJupiter {
    @RegisterExtension
    static SeleniumExtension seleniumExtension = new SeleniumExtension();

    @BeforeAll
    static void setup() {
        Browser chrome = BrowserBuilder.chrome().build();
        Browser firefox = BrowserBuilder.firefox().build();
        seleniumExtension.addBrowsers(chrome);
        seleniumExtension.addBrowsers(firefox);
        //to stop geckodriver logging:
        System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"/dev/null");
    }

    //@Tag("donotrun")
    @TestTemplate
    void test001babysteps(WebDriver driver) {
        //so these testtemplate test methods will be run twice: for chrome and for firefox
        driver.get(myURL);  
...
    }

    //@Tag("donotrun")
    @TestTemplate
    void test002better(WebDriver driver) {
        driver.get(myURL);
...
    }

    //@Tag("donotrun")
    @TestTemplate
    void test003ITsolutions(WebDriver driver) {
        driver.get(myURL); 
...
    }
}

The surefire-report.html shows:

  | test001babysteps{WebDriver}[1] | 58.666
  | test001babysteps{WebDriver}[2] | 63.859
  | test002better{WebDriver}[1] | 41.516
  | test003ITsolutions{WebDriver}[1] | 19.834

Allow specifying DriverOptions in superclass

Sometimes it would be nice to make a common superclass for tests, specifying DriverOptions there. However, AnnotationsReader.seekFieldAnnotatedWith does not search superclasses when looking for fields. It would be a nice improvement if superclasses were considered as well.

Screenshot taken after @AfterEach cleanup method execution not showing actual failure reason

Hi,
I have a question - currently screenshots are taken after @AfterEach method is executed which doesn't help a lot when I perform cleanup after test - I get screenshot of "item deleted" page instead of what actually was the issue. Is there a possiblity to make screenshot at the end of @test method/during actual failure? Or is there any timeframe between failure and taking screenshot (maybe I execute cleanup too soon)?

Conflict of versions for selenium-java in the POM of io.github.bonigarcia:selenium-jupiter:2.1.1

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for org.seleniumhq.selenium:selenium-java:2.44.0 paths to dependency are:
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-io.github.bonigarcia:selenium-jupiter:2.1.1
    +-org.seleniumhq.selenium:selenium-java:2.44.0 (managed) <-- org.seleniumhq.selenium:selenium-java:3.11.0
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-org.seleniumhq.selenium:selenium-server:3.11.0
    +-org.seleniumhq.selenium:selenium-java:2.44.0 (managed) <-- org.seleniumhq.selenium:selenium-java:3.11.0
and
+-org.xwiki.platform:xwiki-platform-test-docker:10.6-SNAPSHOT
  +-io.github.bonigarcia:selenium-jupiter:2.1.1
    +-io.appium:java-client:5.0.4
      +-org.seleniumhq.selenium:selenium-java:2.44.0 (managed) <-- org.seleniumhq.selenium:selenium-java:3.6.0

So the reason is that the version of io.appium:java-client used (5.0.4) depends on selenium-java 2.44.0 instead of 3.11.0. Best would be to either upgrade the dependency to a more recent version or use an <exclusion> in the java-client dependency.

FTM I'll do the exclusion on XWiki's side. Thanks

Add timeout for Android start in docker container

Problem

When testing with Android browser, Selenium Jupiter starts Docker container with Android and immediately attempts to connect to Appium server which is the part of container. In practice Appium gets ready for test after several minutes, depending of version of Android running in Docker container.

Analysis

Continuous requests force Appium to generate high activity preparing environment for tests which may overload Android container. So testing fails.

Improvement

Add 2 parameters to selenium-jupiter.properties file:

# amount of time that should pass between start of container and the first attempt to connect to Appium in container 
sel.jup.android.device.startup.timeout.sec=75
# amount of time that should pass after failed attempt to initialize Appium before the next attempt 
sel.jup.android.appium.ping.period.sec=10

Appium log file captured with improved code

Note, Selenium Jupiter is waiting for Android starts during 2019-02-14 08:45:33:667 - 2019-02-14 08:48:25:830 since I use sel.jup.android.device.startup.timeout.sec=180

2019-02-14 08:45:33:619 - warn: [Appium] Appium support for versions of node < 8 has been deprecated and will be removed in a future version. Please upgrade!
2019-02-14 08:45:33:626 - info: [Appium] Welcome to Appium v1.9.1
2019-02-14 08:45:33:628 - info: [Appium] Non-default server args:
2019-02-14 08:45:33:629 - info: [Appium]   log: /var/log/supervisor/appium.log
2019-02-14 08:45:33:629 - info: [Appium]   chromedriverExecutable: /root/chromedriver
2019-02-14 08:45:33:667 - info: [Appium] Appium REST http interface listener started on 0.0.0.0:4723
2019-02-14 08:48:25:830 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 08:48:25:831 - info: [HTTP] {"desiredCapabilities":{"appium:deviceReadyTimeout":60,"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"appium:adbExecTimeout":240000,"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","appium:androidInstallTimeout":120000,"platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"appium:adbExecTimeout":240000,"appium:androidInstallTimeout":120000,"appium:deviceReadyTimeout":60,"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 08:48:25:837 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"appium:deviceReadyTimeout":60,"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"appium:adbExecTimeout":240000,"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","appium:androidInstallTimeout":120000,"platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"appium:adbExecTimeout":240000,"appium:androidInstallTimeout":120000,"appium:deviceReadyTimeout":60,"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 08:48:25:840 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550134105839 (00:48:25 GMT-0800 (PST))
2019-02-14 08:48:25:847 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 08:48:25:856 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 08:48:25:858 - info: [Appium] Capabilities:
2019-02-14 08:48:25:859 - info: [Appium]   browserName: chrome
2019-02-14 08:48:25:860 - info: [Appium]   goog:chromeOptions: {
2019-02-14 08:48:25:861 - info: [Appium]     args: {
2019-02-14 08:48:25:861 - info: [Appium]       0: --disable-translate
2019-02-14 08:48:25:862 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 08:48:25:862 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 08:48:25:863 - info: [Appium]     }
2019-02-14 08:48:25:863 - info: [Appium]     extensions: {
2019-02-14 08:48:25:864 - info: [Appium]     }
2019-02-14 08:48:25:864 - info: [Appium]   }
2019-02-14 08:48:25:865 - info: [Appium]   loggingPrefs: {
2019-02-14 08:48:25:865 - info: [Appium]     browser: ALL
2019-02-14 08:48:25:866 - info: [Appium]   }
2019-02-14 08:48:25:866 - info: [Appium]   platform: ANDROID
2019-02-14 08:48:25:867 - info: [Appium]   platformName: android
2019-02-14 08:48:25:868 - info: [Appium]   version: 
2019-02-14 08:48:25:869 - info: [Appium]   adbExecTimeout: 240000
2019-02-14 08:48:25:870 - info: [Appium]   androidInstallTimeout: 120000
2019-02-14 08:48:25:871 - info: [Appium]   deviceReadyTimeout: 60
2019-02-14 08:48:25:872 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 08:48:25:887 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"deviceReadyTimeout":60,"c... were provided
2019-02-14 08:48:25:888 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 08:48:25:911 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 08:48:25:973 - info: [BaseDriver] Session created with session id: 73486c91-3254-46fc-b055-3fb4241aac82
2019-02-14 08:48:26:063 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 08:48:26:064 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 08:48:26:064 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 08:48:26:068 - info: [ADB] Checking whether adb is present
2019-02-14 08:48:26:075 - info: [ADB] Found 1 'build-tools' folders under '/root' (newest first):
2019-02-14 08:48:26:075 - info: [ADB]     /root/build-tools/28.0.3
2019-02-14 08:48:26:076 - info: [ADB] Using adb from /root/platform-tools/adb
2019-02-14 08:48:26:077 - info: [AndroidDriver] Retrieving device list
2019-02-14 08:48:26:078 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 08:48:26:080 - info: [debug] [ADB] Getting connected devices...
2019-02-14 08:48:26:095 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 08:48:26:097 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 08:48:26:100 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 08:48:26:102 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 08:48:26:209 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 08:48:26:210 - info: [debug] [ADB] Device API level: 25
2019-02-14 08:48:26:211 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 08:48:26:212 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 08:48:26:213 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 08:48:26:213 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 08:48:28:515 - info: [AndroidDriver] Starting Android session
2019-02-14 08:48:28:517 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
2019-02-14 08:48:28:529 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
2019-02-14 08:48:28:583 - info: [debug] [AndroidDriver] Pushing settings apk to device...
2019-02-14 08:48:28:586 - info: [debug] [ADB] Getting install status for io.appium.settings
2019-02-14 08:48:28:586 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings'
2019-02-14 08:48:31:142 - info: [debug] [ADB] App is not installed
2019-02-14 08:48:31:145 - info: [debug] [ADB] App '/usr/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk' not installed. Installing
2019-02-14 08:48:31:146 - info: [debug] [ADB] Device API level: 25
2019-02-14 08:48:31:147 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 install -g /usr/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk'
2019-02-14 08:48:37:694 - info: [debug] [ADB] Install command stdout: Success
2019-02-14 08:48:37:697 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell ps'
2019-02-14 08:48:37:908 - info: [debug] [ADB] Device API level: 25
2019-02-14 08:48:37:909 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
2019-02-14 08:48:43:722 - info: [debug] [ADB] Device API level: 25
2019-02-14 08:48:43:722 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell appops set io.appium.settings android\:mock_location allow'
2019-02-14 08:48:43:884 - warn: [AndroidDriver] setDeviceLanguageCountry requires language or country.
2019-02-14 08:48:43:885 - warn: [AndroidDriver] Got language: 'null' and country: 'null'
2019-02-14 08:48:43:888 - info: [debug] [Logcat] Starting logcat capture
2019-02-14 08:48:44:109 - info: [debug] [AndroidDriver] Pushing unlock helper app to device...
2019-02-14 08:48:44:109 - info: [debug] [ADB] Getting install status for io.appium.unlock
2019-02-14 08:48:44:110 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.unlock'
2019-02-14 08:48:44:994 - info: [debug] [ADB] App is not installed
2019-02-14 08:48:45:000 - info: [debug] [ADB] App '/usr/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk' not installed. Installing
2019-02-14 08:48:45:001 - info: [debug] [ADB] Device API level: 25
2019-02-14 08:48:45:002 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 install -g /usr/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk'
2019-02-14 08:48:58:790 - info: [debug] [ADB] Install command stdout: Success
2019-02-14 08:48:58:792 - info: [ADB] Getting device platform version
2019-02-14 08:48:58:793 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
2019-02-14 08:48:58:977 - info: [debug] [ADB] Current device property 'ro.build.version.release': 7.1.1
2019-02-14 08:48:58:978 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell wm size'
2019-02-14 08:49:02:230 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.model'
2019-02-14 08:49:02:291 - info: [debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
2019-02-14 08:49:02:297 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer'
2019-02-14 08:49:02:387 - info: [debug] [ADB] Current device property 'ro.product.manufacturer': Google
2019-02-14 08:49:02:389 - warn: [AndroidDriver] No app sent in, not parsing package/activity
2019-02-14 08:49:02:401 - info: [debug] [AndroidDriver] No app capability. Assuming it is already on the device
2019-02-14 08:49:02:403 - info: [debug] [ADB] Getting install status for com.android.chrome
2019-02-14 08:49:02:403 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 08:49:03:313 - info: [debug] [ADB] App is installed
2019-02-14 08:49:03:314 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.android.chrome'
2019-02-14 08:49:04:803 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear com.android.chrome'
2019-02-14 08:49:07:173 - info: [debug] [AndroidDriver] Performed fast reset on the installed 'com.android.chrome' application (stop and clear)
2019-02-14 08:49:07:174 - info: [debug] [AndroidBootstrap] Watching for bootstrap disconnect
2019-02-14 08:49:07:178 - info: [debug] [ADB] Forwarding system: 4724 to device: 4724
2019-02-14 08:49:07:179 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 forward tcp\:4724 tcp\:4724'
2019-02-14 08:49:07:190 - info: [debug] [UiAutomator] Starting UiAutomator
2019-02-14 08:49:07:191 - info: [debug] [UiAutomator] Moving to state 'starting'
2019-02-14 08:49:07:191 - info: [debug] [UiAutomator] Parsing uiautomator jar
2019-02-14 08:49:07:192 - info: [debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
2019-02-14 08:49:07:192 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 push /usr/lib/node_modules/appium/node_modules/appium-android-driver/bootstrap/bin/AppiumBootstrap.jar /data/local/tmp/'
2019-02-14 08:49:07:305 - info: [debug] [ADB] Attempting to kill all uiautomator processes
2019-02-14 08:49:07:306 - info: [debug] [ADB] Getting all processes with uiautomator
2019-02-14 08:49:07:307 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell ps'
2019-02-14 08:49:07:445 - info: [ADB] No uiautomator process found to kill, continuing...
2019-02-14 08:49:07:446 - info: [debug] [UiAutomator] Starting UIAutomator
2019-02-14 08:49:07:447 - info: [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
2019-02-14 08:49:12:395 - info: [debug] [UiAutomator] Moving to state 'online'
2019-02-14 08:49:12:398 - info: [AndroidBootstrap] Android bootstrap socket is now connected
2019-02-14 08:49:12:400 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
2019-02-14 08:49:12:411 - info: [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
2019-02-14 08:49:12:412 - info: [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
2019-02-14 08:49:12:577 - info: [AndroidDriver] Screen already unlocked, doing nothing
2019-02-14 08:49:12:578 - info: [AndroidDriver] Starting a chrome-based browser session
2019-02-14 08:49:12:584 - info: [debug] [AndroidDriver] A port was not given, using random port: 8000
2019-02-14 08:49:12:585 - warn: [AndroidDriver] Merging 'goog:chromeOptions' into 'chromeOptions'. This may cause unexpected behavior
2019-02-14 08:49:12:587 - info: [debug] [Chromedriver] Changed state to 'starting'
2019-02-14 08:49:12:588 - info: [Chromedriver] Set chromedriver binary as: /root/chromedriver
2019-02-14 08:49:12:590 - info: [debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/root/chromedriver.*--port=8000"
2019-02-14 08:49:12:609 - warn: [Chromedriver] No old chromedrivers seemed to exist
2019-02-14 08:49:12:609 - info: [debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
2019-02-14 08:49:12:610 - info: [debug] [ADB] List forwarding ports
2019-02-14 08:49:12:610 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 forward --list'
2019-02-14 08:49:12:623 - info: [Chromedriver] Spawning chromedriver with: /root/chromedriver --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
2019-02-14 08:49:12:682 - info: [debug] [Chromedriver] Chromedriver version: '2.28.455506'
2019-02-14 08:49:12:686 - info: [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-02-14 08:49:12:687 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
2019-02-14 08:49:12:707 - info: [debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"4.15.0-45-generic\"}}}"
2019-02-14 08:49:12:709 - info: [debug] [JSONWP Proxy] Matched '/session' to command name 'createSession'
2019-02-14 08:49:12:710 - info: [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[],"androidDeviceSerial":"emulator-5554"}}}
2019-02-14 08:49:56:358 - info: [debug] [Chromedriver] Webview version: 'Chrome/55.0.2883.91'
2019-02-14 08:49:57:094 - info: [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"d4e4a08e6c711c8dfd630343f9e994ab","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"55.0.2883.91","webStorageEnabled":true}}
2019-02-14 08:49:57:095 - info: [debug] [Chromedriver] Changed state to 'online'
2019-02-14 08:49:57:097 - info: [Appium] New AndroidDriver session created successfully, session 73486c91-3254-46fc-b055-3fb4241aac82 added to master session list
2019-02-14 08:49:57:098 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550134197098 (00:49:57 GMT-0800 (PST))
2019-02-14 08:49:57:099 - info: [debug] [W3C] Cached the protocol value 'W3C' for the new session 73486c91-3254-46fc-b055-3fb4241aac82
2019-02-14 08:49:57:101 - info: [debug] [W3C] Responding to client with driver.createSession() result: {"capabilities":{"platform":"ANDROID","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"platformName":"android","loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","version":"","adbExecTimeout":240000,"androidInstallTimeout":120000,"deviceReadyTimeout":60,"deviceName":"Samsung Galaxy S6"},"browserName":"chrome","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"platformName":"android","loggingPrefs":{"browser":"ALL"},"version":"","adbExecTimeout":240000,"androidInstallTimeout":120000,"deviceReadyTimeout":60,"deviceName":"emulat...
2019-02-14 08:49:57:106 - info: [HTTP] <-- POST /wd/hub/session 200 91274 ms - 1248
2019-02-14 08:49:57:106 - info: [HTTP] 
2019-02-14 08:49:57:169 - info: [HTTP] --> GET /wd/hub/session/73486c91-3254-46fc-b055-3fb4241aac82
2019-02-14 08:49:57:170 - info: [HTTP] {}

Appium log file captured with original code

Note multiple unsuccessful attempts to initialize below. Seek for POST /wd/hub/session 500

2019-02-14 09:37:17:787 - info: [ADB]     /root/build-tools/28.0.3
2019-02-14 09:37:17:788 - info: [ADB] Using adb from /root/platform-tools/adb
2019-02-14 09:37:17:789 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:37:17:790 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:37:17:791 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:37:17:802 - info: [debug] [ADB] 0 device(s) connected
2019-02-14 09:37:17:803 - info: [debug] [ADB] Could not find devices, restarting adb server...
2019-02-14 09:37:17:803 - info: [debug] [ADB] Restarting adb
2019-02-14 09:37:17:804 - info: [debug] [ADB] Killing adb server on port 5037
2019-02-14 09:37:18:016 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:37:21:032 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:37:21:035 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:37:21:037 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:37:21:039 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:37:21:067 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:37:21:067 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:37:21:068 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:37:21:068 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:37:21:069 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:37:21:069 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:23:567 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:24:458 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:37:24:460 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:37:24:461 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:25:917 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:27:123 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137047122 (01:37:27 GMT-0800 (PST))
2019-02-14 09:37:27:130 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:37:27:131 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:37:27:131 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:37:27:131 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:37:27:131 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:37:27:131 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:37:27:163 - info: [HTTP] <-- POST /wd/hub/session 500 9536 ms - 1535
2019-02-14 09:37:27:163 - info: [HTTP] 
2019-02-14 09:37:32:202 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:37:32:203 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:37:32:203 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:37:32:203 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137052203 (01:37:32 GMT-0800 (PST))
2019-02-14 09:37:32:204 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:37:32:208 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:37:32:208 - info: [Appium] Capabilities:
2019-02-14 09:37:32:209 - info: [Appium]   browserName: chrome
2019-02-14 09:37:32:210 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:37:32:210 - info: [Appium]     args: {
2019-02-14 09:37:32:210 - info: [Appium]       0: --disable-translate
2019-02-14 09:37:32:211 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:37:32:211 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:37:32:211 - info: [Appium]     }
2019-02-14 09:37:32:211 - info: [Appium]     extensions: {
2019-02-14 09:37:32:211 - info: [Appium]     }
2019-02-14 09:37:32:211 - info: [Appium]   }
2019-02-14 09:37:32:211 - info: [Appium]   loggingPrefs: {
2019-02-14 09:37:32:212 - info: [Appium]     browser: ALL
2019-02-14 09:37:32:212 - info: [Appium]   }
2019-02-14 09:37:32:212 - info: [Appium]   platform: ANDROID
2019-02-14 09:37:32:212 - info: [Appium]   platformName: android
2019-02-14 09:37:32:212 - info: [Appium]   version: 
2019-02-14 09:37:32:213 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:37:32:215 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:37:32:216 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:37:32:225 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:37:32:226 - info: [BaseDriver] Session created with session id: 03b46797-c985-4f9d-88f3-31ad7d56c0ee
2019-02-14 09:37:32:320 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:37:32:322 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:37:32:323 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:37:32:324 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:37:32:324 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:37:32:325 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:37:32:337 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:37:32:338 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:37:32:338 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:37:32:339 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:37:32:444 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:37:32:444 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:37:32:445 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:37:32:446 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:37:32:446 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:37:32:447 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:33:622 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:34:797 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:37:34:798 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:37:34:799 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:35:675 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:36:607 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137056606 (01:37:36 GMT-0800 (PST))
2019-02-14 09:37:36:608 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:37:36:608 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:37:36:608 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:37:36:608 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:37:36:609 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:37:36:609 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:37:36:613 - info: [HTTP] <-- POST /wd/hub/session 500 4408 ms - 1535
2019-02-14 09:37:36:613 - info: [HTTP] 
2019-02-14 09:37:41:632 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:37:41:633 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:37:41:633 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:37:41:637 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137061633 (01:37:41 GMT-0800 (PST))
2019-02-14 09:37:41:639 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:37:41:640 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:37:41:641 - info: [Appium] Capabilities:
2019-02-14 09:37:41:642 - info: [Appium]   browserName: chrome
2019-02-14 09:37:41:642 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:37:41:643 - info: [Appium]     args: {
2019-02-14 09:37:41:644 - info: [Appium]       0: --disable-translate
2019-02-14 09:37:41:644 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:37:41:645 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:37:41:645 - info: [Appium]     }
2019-02-14 09:37:41:645 - info: [Appium]     extensions: {
2019-02-14 09:37:41:645 - info: [Appium]     }
2019-02-14 09:37:41:646 - info: [Appium]   }
2019-02-14 09:37:41:646 - info: [Appium]   loggingPrefs: {
2019-02-14 09:37:41:646 - info: [Appium]     browser: ALL
2019-02-14 09:37:41:646 - info: [Appium]   }
2019-02-14 09:37:41:646 - info: [Appium]   platform: ANDROID
2019-02-14 09:37:41:646 - info: [Appium]   platformName: android
2019-02-14 09:37:41:647 - info: [Appium]   version: 
2019-02-14 09:37:41:647 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:37:41:648 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:37:41:648 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:37:41:654 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:37:41:659 - info: [BaseDriver] Session created with session id: b8de5508-424c-486e-ae2b-9cc99ee3dd88
2019-02-14 09:37:41:743 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:37:41:744 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:37:41:744 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:37:41:745 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:37:41:746 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:37:41:746 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:37:41:759 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:37:41:760 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:37:41:764 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:37:41:767 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:37:41:876 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:37:41:877 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:37:41:878 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:37:41:878 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:37:41:879 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:37:41:879 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:43:631 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:45:208 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:37:45:208 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:37:45:209 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:46:616 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:47:604 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137067603 (01:37:47 GMT-0800 (PST))
2019-02-14 09:37:47:605 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:37:47:605 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:37:47:605 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:37:47:605 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:37:47:606 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:37:47:606 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:37:47:608 - info: [HTTP] <-- POST /wd/hub/session 500 5980 ms - 1535
2019-02-14 09:37:47:609 - info: [HTTP] 
2019-02-14 09:37:52:630 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:37:52:631 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:37:52:632 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:37:52:636 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137072633 (01:37:52 GMT-0800 (PST))
2019-02-14 09:37:52:637 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:37:52:638 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:37:52:639 - info: [Appium] Capabilities:
2019-02-14 09:37:52:642 - info: [Appium]   browserName: chrome
2019-02-14 09:37:52:643 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:37:52:644 - info: [Appium]     args: {
2019-02-14 09:37:52:644 - info: [Appium]       0: --disable-translate
2019-02-14 09:37:52:645 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:37:52:646 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:37:52:646 - info: [Appium]     }
2019-02-14 09:37:52:647 - info: [Appium]     extensions: {
2019-02-14 09:37:52:647 - info: [Appium]     }
2019-02-14 09:37:52:647 - info: [Appium]   }
2019-02-14 09:37:52:648 - info: [Appium]   loggingPrefs: {
2019-02-14 09:37:52:648 - info: [Appium]     browser: ALL
2019-02-14 09:37:52:648 - info: [Appium]   }
2019-02-14 09:37:52:650 - info: [Appium]   platform: ANDROID
2019-02-14 09:37:52:651 - info: [Appium]   platformName: android
2019-02-14 09:37:52:651 - info: [Appium]   version: 
2019-02-14 09:37:52:652 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:37:52:654 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:37:52:655 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:37:52:659 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:37:52:663 - info: [BaseDriver] Session created with session id: c701db25-7247-464d-8952-c5723a6ddde1
2019-02-14 09:37:52:744 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:37:52:745 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:37:52:745 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:37:52:746 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:37:52:746 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:37:52:746 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:37:52:770 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:37:52:770 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:37:52:772 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:37:52:773 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:37:54:212 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:37:54:213 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:37:54:213 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:37:54:213 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:37:54:213 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:37:54:214 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:56:132 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:37:57:179 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:37:57:180 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:37:57:181 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:58:413 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:37:59:513 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137079513 (01:37:59 GMT-0800 (PST))
2019-02-14 09:37:59:514 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:37:59:514 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:37:59:515 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:37:59:515 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:37:59:515 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:37:59:515 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:37:59:518 - info: [HTTP] <-- POST /wd/hub/session 500 6887 ms - 1535
2019-02-14 09:37:59:518 - info: [HTTP] 
2019-02-14 09:38:04:536 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:38:04:536 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:38:04:537 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:38:04:537 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137084537 (01:38:04 GMT-0800 (PST))
2019-02-14 09:38:04:538 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:38:04:539 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:38:04:549 - info: [Appium] Capabilities:
2019-02-14 09:38:04:549 - info: [Appium]   browserName: chrome
2019-02-14 09:38:04:550 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:38:04:550 - info: [Appium]     args: {
2019-02-14 09:38:04:550 - info: [Appium]       0: --disable-translate
2019-02-14 09:38:04:551 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:38:04:551 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:38:04:551 - info: [Appium]     }
2019-02-14 09:38:04:552 - info: [Appium]     extensions: {
2019-02-14 09:38:04:552 - info: [Appium]     }
2019-02-14 09:38:04:554 - info: [Appium]   }
2019-02-14 09:38:04:555 - info: [Appium]   loggingPrefs: {
2019-02-14 09:38:04:556 - info: [Appium]     browser: ALL
2019-02-14 09:38:04:556 - info: [Appium]   }
2019-02-14 09:38:04:556 - info: [Appium]   platform: ANDROID
2019-02-14 09:38:04:556 - info: [Appium]   platformName: android
2019-02-14 09:38:04:556 - info: [Appium]   version: 
2019-02-14 09:38:04:557 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:38:04:562 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:38:04:563 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:38:04:579 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:38:04:584 - info: [BaseDriver] Session created with session id: 7c44f1d1-1f81-4ed1-9dd2-88b856c7f27f
2019-02-14 09:38:04:668 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:38:04:669 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:38:04:670 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:38:04:672 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:38:04:672 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:38:04:672 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:38:04:684 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:38:04:684 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:38:04:686 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:38:04:691 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:38:04:755 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:38:04:756 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:38:04:756 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:38:04:757 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:38:04:757 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:38:04:757 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:38:05:692 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:38:06:726 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:38:06:727 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:38:06:728 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:38:07:564 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:38:08:790 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137088790 (01:38:08 GMT-0800 (PST))
2019-02-14 09:38:08:791 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:38:08:791 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:38:08:791 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:38:08:791 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:38:08:791 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:38:08:796 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:38:08:801 - info: [HTTP] <-- POST /wd/hub/session 500 4262 ms - 1535
2019-02-14 09:38:08:802 - info: [HTTP] 
2019-02-14 09:38:13:812 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:38:13:813 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:38:13:814 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:38:13:814 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137093814 (01:38:13 GMT-0800 (PST))
2019-02-14 09:38:13:815 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:38:13:817 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:38:13:817 - info: [Appium] Capabilities:
2019-02-14 09:38:13:817 - info: [Appium]   browserName: chrome
2019-02-14 09:38:13:818 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:38:13:818 - info: [Appium]     args: {
2019-02-14 09:38:13:818 - info: [Appium]       0: --disable-translate
2019-02-14 09:38:13:818 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:38:13:819 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:38:13:819 - info: [Appium]     }
2019-02-14 09:38:13:819 - info: [Appium]     extensions: {
2019-02-14 09:38:13:819 - info: [Appium]     }
2019-02-14 09:38:13:820 - info: [Appium]   }
2019-02-14 09:38:13:820 - info: [Appium]   loggingPrefs: {
2019-02-14 09:38:13:820 - info: [Appium]     browser: ALL
2019-02-14 09:38:13:820 - info: [Appium]   }
2019-02-14 09:38:13:820 - info: [Appium]   platform: ANDROID
2019-02-14 09:38:13:821 - info: [Appium]   platformName: android
2019-02-14 09:38:13:822 - info: [Appium]   version: 
2019-02-14 09:38:13:822 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:38:13:824 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:38:13:824 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:38:13:836 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:38:13:838 - info: [BaseDriver] Session created with session id: 984699e3-b1c3-4b93-8724-a045aad7ced3
2019-02-14 09:38:13:903 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:38:13:903 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:38:13:905 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:38:13:909 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:38:13:910 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:38:13:910 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:38:13:923 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:38:13:923 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:38:13:924 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:38:13:925 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:38:14:021 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:38:14:023 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:38:14:023 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:38:14:024 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:38:14:024 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:38:14:025 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:38:15:511 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:38:17:011 - info: [debug] [AndroidDriver] Shutting down Android driver
2019-02-14 09:38:17:011 - info: [debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
2019-02-14 09:38:17:012 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:38:18:383 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
2019-02-14 09:38:19:875 - info: [debug] [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
2019-02-14 09:38:19:875 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137099875 (01:38:19 GMT-0800 (PST))
2019-02-14 09:38:19:877 - info: [debug] [W3C] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome' exited with code 1'; Stderr: 'Error: Could not access the Package Manager.  Is the system running?'; Code: '1'
2019-02-14 09:38:19:877 - info: [debug] [W3C]     at ADB.execFunc$ (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:327:13)
2019-02-14 09:38:19:877 - info: [debug] [W3C]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
2019-02-14 09:38:19:878 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
2019-02-14 09:38:19:878 - info: [debug] [W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
2019-02-14 09:38:19:878 - info: [debug] [W3C]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2019-02-14 09:38:19:881 - info: [HTTP] <-- POST /wd/hub/session 500 6067 ms - 1535
2019-02-14 09:38:19:885 - info: [HTTP] 
2019-02-14 09:38:24:893 - info: [HTTP] --> POST /wd/hub/session
2019-02-14 09:38:24:894 - info: [HTTP] {"desiredCapabilities":{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},"capabilities":{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}}
2019-02-14 09:38:24:894 - info: [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"browserName":"chrome","platformName":"Android","deviceName":"Samsung Galaxy S6","version":"","platform":"ANDROID"},null,{"alwaysMatch":{"browserName":"chrome","appium:deviceName":"Samsung Galaxy S6","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","platformName":"android","version":""},"firstMatch":[{}]}]
2019-02-14 09:38:24:894 - info: [debug] [BaseDriver] Event 'newSessionRequested' logged at 1550137104894 (01:38:24 GMT-0800 (PST))
2019-02-14 09:38:24:895 - warn: [BaseDriver] The capabilities ["loggingPrefs","platform","version"] are not standard capabilities and should have an extension prefix
2019-02-14 09:38:24:897 - info: [Appium] Creating new AndroidDriver (v4.1.1) session
2019-02-14 09:38:24:897 - info: [Appium] Capabilities:
2019-02-14 09:38:24:897 - info: [Appium]   browserName: chrome
2019-02-14 09:38:24:897 - info: [Appium]   goog:chromeOptions: {
2019-02-14 09:38:24:898 - info: [Appium]     args: {
2019-02-14 09:38:24:898 - info: [Appium]       0: --disable-translate
2019-02-14 09:38:24:898 - info: [Appium]       1: --proxy-server=http://15.89.30.62:8080
2019-02-14 09:38:24:898 - info: [Appium]       2: --proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz
2019-02-14 09:38:24:899 - info: [Appium]     }
2019-02-14 09:38:24:899 - info: [Appium]     extensions: {
2019-02-14 09:38:24:899 - info: [Appium]     }
2019-02-14 09:38:24:899 - info: [Appium]   }
2019-02-14 09:38:24:900 - info: [Appium]   loggingPrefs: {
2019-02-14 09:38:24:900 - info: [Appium]     browser: ALL
2019-02-14 09:38:24:900 - info: [Appium]   }
2019-02-14 09:38:24:900 - info: [Appium]   platform: ANDROID
2019-02-14 09:38:24:900 - info: [Appium]   platformName: android
2019-02-14 09:38:24:901 - info: [Appium]   version: 
2019-02-14 09:38:24:901 - info: [Appium]   deviceName: Samsung Galaxy S6
2019-02-14 09:38:24:903 - info: [debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"browserNam... and MJSONWP desired capabilities {"chromeOptions":{"args":["... were provided
2019-02-14 09:38:24:903 - info: [debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"browserNam...
2019-02-14 09:38:24:912 - warn: [BaseDriver] The following capabilities were provided, but are not recognized by appium: goog:chromeOptions, loggingPrefs, platform, version.
2019-02-14 09:38:24:915 - info: [BaseDriver] Session created with session id: a1fd02aa-4f86-44d5-941b-34c941f0ca60
2019-02-14 09:38:24:994 - info: [AndroidDriver] Java version is: 1.8.0_181
2019-02-14 09:38:24:999 - info: [AndroidDriver] We're going to run a Chrome-based session
2019-02-14 09:38:25:003 - info: [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
2019-02-14 09:38:25:006 - info: [AndroidDriver] Retrieving device list
2019-02-14 09:38:25:007 - info: [debug] [ADB] Trying to find a connected android device
2019-02-14 09:38:25:007 - info: [debug] [ADB] Getting connected devices...
2019-02-14 09:38:25:016 - info: [debug] [ADB] 1 device(s) connected
2019-02-14 09:38:25:016 - info: [AndroidDriver] Using device: emulator-5554
2019-02-14 09:38:25:018 - info: [debug] [ADB] Setting device id to emulator-5554
2019-02-14 09:38:25:018 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
2019-02-14 09:38:25:072 - info: [debug] [ADB] Current device property 'ro.build.version.sdk': 25
2019-02-14 09:38:25:072 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:38:25:072 - warn: [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
2019-02-14 09:38:25:073 - info: [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
2019-02-14 09:38:25:073 - info: [debug] [AndroidDriver] Checking whether package is present on the device
2019-02-14 09:38:25:074 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:38:28:535 - info: [AndroidDriver] Starting Android session
2019-02-14 09:38:28:536 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
2019-02-14 09:38:28:553 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
2019-02-14 09:38:28:714 - info: [debug] [AndroidDriver] Pushing settings apk to device...
2019-02-14 09:38:28:723 - info: [debug] [ADB] Getting install status for io.appium.settings
2019-02-14 09:38:28:723 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings'
2019-02-14 09:38:37:383 - info: [debug] [ADB] App is not installed
2019-02-14 09:38:37:383 - info: [debug] [ADB] App '/usr/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk' not installed. Installing
2019-02-14 09:38:37:384 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:38:37:385 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 install -g /usr/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk'
2019-02-14 09:39:29:993 - info: [debug] [ADB] Install command stdout: Success
2019-02-14 09:39:29:994 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell ps'
2019-02-14 09:39:30:564 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:39:30:565 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
2019-02-14 09:39:36:057 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:39:36:058 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell appops set io.appium.settings android\:mock_location allow'
2019-02-14 09:39:37:188 - warn: [AndroidDriver] setDeviceLanguageCountry requires language or country.
2019-02-14 09:39:37:188 - warn: [AndroidDriver] Got language: 'null' and country: 'null'
2019-02-14 09:39:37:196 - info: [debug] [Logcat] Starting logcat capture
2019-02-14 09:39:37:807 - info: [debug] [AndroidDriver] Pushing unlock helper app to device...
2019-02-14 09:39:37:808 - info: [debug] [ADB] Getting install status for io.appium.unlock
2019-02-14 09:39:37:809 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.unlock'
2019-02-14 09:39:40:454 - info: [debug] [ADB] App is not installed
2019-02-14 09:39:40:456 - info: [debug] [ADB] App '/usr/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk' not installed. Installing
2019-02-14 09:39:40:457 - info: [debug] [ADB] Device API level: 25
2019-02-14 09:39:40:457 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 install -g /usr/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk'
2019-02-14 09:40:05:113 - info: [debug] [ADB] Install command stdout: Success
2019-02-14 09:40:05:114 - info: [ADB] Getting device platform version
2019-02-14 09:40:05:114 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
2019-02-14 09:40:05:157 - info: [debug] [ADB] Current device property 'ro.build.version.release': 7.1.1
2019-02-14 09:40:05:159 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell wm size'
2019-02-14 09:40:06:209 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.model'
2019-02-14 09:40:06:296 - info: [debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
2019-02-14 09:40:06:297 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer'
2019-02-14 09:40:06:368 - info: [debug] [ADB] Current device property 'ro.product.manufacturer': Google
2019-02-14 09:40:06:371 - warn: [AndroidDriver] No app sent in, not parsing package/activity
2019-02-14 09:40:06:374 - info: [debug] [AndroidDriver] No app capability. Assuming it is already on the device
2019-02-14 09:40:06:377 - info: [debug] [ADB] Getting install status for com.android.chrome
2019-02-14 09:40:06:383 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages com.android.chrome'
2019-02-14 09:40:07:202 - info: [debug] [ADB] App is installed
2019-02-14 09:40:07:203 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.android.chrome'
2019-02-14 09:40:08:195 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear com.android.chrome'
2019-02-14 09:40:09:568 - info: [debug] [AndroidDriver] Performed fast reset on the installed 'com.android.chrome' application (stop and clear)
2019-02-14 09:40:09:569 - info: [debug] [AndroidBootstrap] Watching for bootstrap disconnect
2019-02-14 09:40:09:571 - info: [debug] [ADB] Forwarding system: 4724 to device: 4724
2019-02-14 09:40:09:571 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 forward tcp\:4724 tcp\:4724'
2019-02-14 09:40:09:585 - info: [debug] [UiAutomator] Starting UiAutomator
2019-02-14 09:40:09:586 - info: [debug] [UiAutomator] Moving to state 'starting'
2019-02-14 09:40:09:587 - info: [debug] [UiAutomator] Parsing uiautomator jar
2019-02-14 09:40:09:590 - info: [debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
2019-02-14 09:40:09:591 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 push /usr/lib/node_modules/appium/node_modules/appium-android-driver/bootstrap/bin/AppiumBootstrap.jar /data/local/tmp/'
2019-02-14 09:40:09:648 - info: [debug] [ADB] Attempting to kill all uiautomator processes
2019-02-14 09:40:09:649 - info: [debug] [ADB] Getting all processes with uiautomator
2019-02-14 09:40:09:650 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell ps'
2019-02-14 09:40:09:807 - info: [ADB] No uiautomator process found to kill, continuing...
2019-02-14 09:40:09:808 - info: [debug] [UiAutomator] Starting UIAutomator
2019-02-14 09:40:09:810 - info: [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
2019-02-14 09:40:13:558 - info: [debug] [UiAutomator] Moving to state 'online'
2019-02-14 09:40:13:560 - info: [AndroidBootstrap] Android bootstrap socket is now connected
2019-02-14 09:40:13:562 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
2019-02-14 09:40:13:571 - info: [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Loading json...
2019-02-14 09:40:13:576 - info: [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
2019-02-14 09:40:13:577 - info: [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
2019-02-14 09:40:13:882 - info: [AndroidDriver] Screen already unlocked, doing nothing
2019-02-14 09:40:13:883 - info: [AndroidDriver] Starting a chrome-based browser session
2019-02-14 09:40:13:892 - info: [debug] [AndroidDriver] A port was not given, using random port: 8000
2019-02-14 09:40:13:894 - warn: [AndroidDriver] Merging 'goog:chromeOptions' into 'chromeOptions'. This may cause unexpected behavior
2019-02-14 09:40:13:895 - info: [debug] [Chromedriver] Changed state to 'starting'
2019-02-14 09:40:13:897 - info: [Chromedriver] Set chromedriver binary as: /root/chromedriver
2019-02-14 09:40:13:898 - info: [debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/root/chromedriver.*--port=8000"
2019-02-14 09:40:13:915 - warn: [Chromedriver] No old chromedrivers seemed to exist
2019-02-14 09:40:13:916 - info: [debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
2019-02-14 09:40:13:916 - info: [debug] [ADB] List forwarding ports
2019-02-14 09:40:13:917 - info: [debug] [ADB] Running '/root/platform-tools/adb -P 5037 -s emulator-5554 forward --list'
2019-02-14 09:40:13:930 - info: [Chromedriver] Spawning chromedriver with: /root/chromedriver --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
2019-02-14 09:40:13:983 - info: [debug] [Chromedriver] Chromedriver version: '2.28.455506'
2019-02-14 09:40:13:986 - info: [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-02-14 09:40:13:995 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
2019-02-14 09:40:14:236 - info: [debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
2019-02-14 09:40:14:237 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
2019-02-14 09:40:14:261 - info: [debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"4.15.0-45-generic\"}}}"
2019-02-14 09:40:14:263 - info: [debug] [JSONWP Proxy] Matched '/session' to command name 'createSession'
2019-02-14 09:40:14:264 - info: [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[],"androidDeviceSerial":"emulator-5554"}}}
2019-02-14 09:41:02:978 - info: [debug] [Chromedriver] Webview version: 'Chrome/55.0.2883.91'
2019-02-14 09:41:03:716 - info: [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"05475594e7b7c6b7cebeabc4632a3e44","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f)"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"pageLoadStrategy":"normal","platform":"ANDROID","rotatable":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"55.0.2883.91","webStorageEnabled":true}}
2019-02-14 09:41:03:717 - info: [debug] [Chromedriver] Changed state to 'online'
2019-02-14 09:41:03:718 - info: [Appium] New AndroidDriver session created successfully, session a1fd02aa-4f86-44d5-941b-34c941f0ca60 added to master session list
2019-02-14 09:41:03:719 - info: [debug] [BaseDriver] Event 'newSessionStarted' logged at 1550137263719 (01:41:03 GMT-0800 (PST))
2019-02-14 09:41:03:720 - info: [debug] [W3C] Cached the protocol value 'W3C' for the new session a1fd02aa-4f86-44d5-941b-34c941f0ca60
2019-02-14 09:41:03:722 - info: [debug] [W3C] Responding to client with driver.createSession() result: {"capabilities":{"platform":"ANDROID","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"chrome","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"platformName":"android","loggingPrefs":{"browser":"ALL"},"platform":"ANDROID","version":"","deviceName":"Samsung Galaxy S6"},"browserName":"chrome","goog:chromeOptions":{"args":["--disable-translate","--proxy-server=http://15.89.30.62:8080","--proxy-bypass-list=aaa,localhost,127.0.0.1,127.*,172.17.*,15.20.172.*,zzz"],"extensions":[]},"platformName":"android","loggingPrefs":{"browser":"ALL"},"version":"","deviceName":"emulator-5554","deviceUDID":"emulator-5554","platformVersion":"7.1.1","deviceScreenSize":"474x839","deviceModel":"Android SDK built for x86","deviceManufacturer":"G...
2019-02-14 09:41:03:731 - info: [HTTP] <-- POST /wd/hub/session 200 158829 ms - 1090
2019-02-14 09:41:03:731 - info: [HTTP] 
2019-02-14 09:41:03:775 - info: [HTTP] --> GET /wd/hub/session/a1fd02aa-4f86-44d5-941b-34c941f0ca60
2019-02-14 09:41:03:776 - info: [HTTP] {}

Support AppiumServiceBuilder customizations

Description of the problem:
Currently seljup starts up a local appium service using the default options, as

                    appiumDriverLocalService = AppiumDriverLocalService
                            .buildDefaultService();

It would be nice if we could customize the server options via seljup, like we can do with the DesiredCapabilities.

The specific use case is overriding the default "debug" log level, which makes for very verbose output in the console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.