karatelabs / karate

Test Automation Made Simple
https://karatelabs.github.io/karate
MIT License
8.14k stars 1.94k forks source link

Karate mobile: input() doesn't work #1384

Closed arochagabriel closed 3 years ago

arochagabriel commented 3 years ago

build.gradle

plugins {
    id 'java'
    id 'idea'
    id 'scala'
}

ext {
    karateVersion = '0.9.6'
    schemaValidatorVersion = '2.2.8'
    karateUIVersion = '0.9.4'
}

group 'org.example'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    maven { url 'https://plugins.gradle.org/m2/' }
}

dependencies {

    testImplementation "com.intuit.karate:karate-junit5:${karateVersion}"
    testImplementation "com.intuit.karate:karate-ui:${karateUIVersion}"
    testImplementation "com.intuit.karate:karate-apache:${karateVersion}"
    implementation "com.intuit.karate:karate-gatling:${karateVersion}"
    implementation "com.github.java-json-tools:json-schema-validator:${schemaValidatorVersion}"
}

sourceSets {
    test {
        resources {
            srcDir file('src/test/java')
            srcDir file('src/test/scala')
            exclude '**/*.java'
            exclude '**/*.scala'
        }
    }
}

test {
    useJUnitPlatform()
    include '**/TestParallel*'
    systemProperty "cucumber.options", System.properties.getProperty("cucumber.options")
    systemProperty "karate.options", System.properties.getProperty("karate.options")
    systemProperty "karate.env", System.properties.getProperty("karate.env")
    systemProperty "country", System.properties.getProperty("country")
    outputs.upToDateWhen { false }
}

task gatlingRun(type: JavaExec) {
    group = 'Web Tests'
    description = 'Run Gatling Tests'
    new File("${buildDir}/reports/gatling").mkdirs()
    classpath = sourceSets.test.runtimeClasspath
    main = "io.gatling.app.Gatling"
    args = [
            // change this to suit your simulation entry-point
            '-s', 'simulation.test',
            '-rf', "${buildDir}/reports/gatling"
    ]
    systemProperties System.properties
}
Background: App Preset
    * configure driver = { type: 'android', webDriverPath : "/wd/hub", httpConfig : { readTimeout: 120000 }}
    * def driverCaps = {}
    * set driverCaps
      | path                    | value                                                                               |
      | platformName            | "Android"                                                                           |
      | platformVersion         | "8.1"                                                                                |
      | deviceName              | "emulator-5554"                                                                     |
      | app                     | "appl.apk" |
      | newCommandTimeout       | 180                                                                                 |
      | avd                     | "devOreo"                                                                             |
      | automationName          | "UiAutomator2"                                                                      |
      | connectHardwareKeyboard | true                                                                                |
      | autoGrantPermissions    | true                                                                                |
    * call read ('classpath:/path/locators.json')

  Scenario: test

    * driver { webDriverSession: { desiredCapabilities : "#(driverCaps)"} }
    * driver.retry(120,5000).click(landingApp.chile)
    * driver.retry(120,5000).click(landingApp.continuar)
    * driver.retry(120,5000).click(addressFrame.confirmarDireccion)
    * driver.retry(120,5000).click(mainPage.search)
    * driver.retry(120,5000).click(searchPage.textBox)
   * driver.retry(30,5000).input(searchPage.textBox,'cebolla')

locators.json

{
  "landingApp": {
    "chile":"#com.company.staging:id/textView13",
    "peru": "#com.company.staging:id/textView14",
    "continuar": "#com.company.staging:id/button4"
  },
  "addressFrame": {
    "confirmarDireccion": "//android.widget.Button[@text='Confirmar dirección']"
  },
  "mainPage": {
    "categoryList": "#com.company.staging:id/categorylist",
    "search": "#com.company.staging:id/search_et"
  },
  "searchPage": {
    "textBox": "//android.widget.EditText[@resource-id='android:id/search_src_text']"
  }
}
14:45:12.581 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $
14:45:12.582 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $
14:45:12.582 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.JsonContext - Put path $ key using value xpath
14:45:12.582 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $
14:45:12.582 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $
14:45:12.582 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.JsonContext - Put path $ key value value //android.widget.EditText[@resource-id='android:id/search_src_text']
14:45:12.583 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: karate
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - request:
13 > POST http://localhost:4723/wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element
13 > Accept-Encoding: gzip,deflate
13 > Connection: Keep-Alive
13 > Content-Length: 96
13 > Content-Type: application/json; charset=UTF-8
13 > Host: localhost:4723
13 > User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)
{"using":"xpath","value":"//android.widget.EditText[@resource-id='android:id/search_src_text']"}

14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://localhost:4723][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10]
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 12][route: {}->http://localhost:4723][total available: 0; route allocated: 1 of 5; total allocated: 1 of 10]
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://localhost:4723
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to localhost/127.0.0.1:4723
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:51620<->127.0.0.1:4723
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-12: set socket timeout to 120000
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
14:45:12.584 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> Content-Type: application/json; charset=UTF-8
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> Content-Length: 96
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> Host: localhost:4723
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> Connection: Keep-Alive
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 >> Accept-Encoding: gzip,deflate
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "Content-Length: 96[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "Host: localhost:4723[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "Connection: Keep-Alive[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "Accept-Encoding: gzip,deflate[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "[\r][\n]"
14:45:12.585 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 >> "{"using":"xpath","value":"//android.widget.EditText[@resource-id='android:id/search_src_text']"}"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "X-Powered-By: Express[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "Vary: X-HTTP-Method-Override[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "Content-Type: application/json; charset=utf-8[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "Content-Length: 164[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "ETag: W/"a4-hmRjfabu+ODxgOm4AHlaVa9pTks"[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "Date: Thu, 26 Nov 2020 17:45:13 GMT[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "Connection: keep-alive[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "[\r][\n]"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-12 << "{"status":7,"value":{"message":"An element could not be located on the page using the given search parameters."},"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb"}"
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << HTTP/1.1 500 Internal Server Error
14:45:13.264 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << X-Powered-By: Express
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << Vary: X-HTTP-Method-Override
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << Content-Type: application/json; charset=utf-8
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << Content-Length: 164
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << ETag: W/"a4-hmRjfabu+ODxgOm4AHlaVa9pTks"
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << Date: Thu, 26 Nov 2020 17:45:13 GMT
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-12 << Connection: keep-alive
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 12][route: {}->http://localhost:4723] can be kept alive indefinitely
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-12: set socket timeout to 0
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 12][route: {}->http://localhost:4723][total available: 1; route allocated: 1 of 5; total allocated: 1 of 10]
14:45:13.265 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - response time in milliseconds: 681,03
13 < 500
13 < Connection: keep-alive
13 < Content-Length: 164
13 < Content-Type: application/json; charset=utf-8
13 < Date: Thu, 26 Nov 2020 17:45:13 GMT
13 < ETag: W/"a4-hmRjfabu+ODxgOm4AHlaVa9pTks"
13 < Vary: X-HTTP-Method-Override
13 < X-Powered-By: Express
{"status":7,"value":{"message":"An element could not be located on the page using the given search parameters."},"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb"}

14:45:13.265 [ForkJoinPool-1-worker-1] WARN com.intuit.karate - http response code: 500, response: {"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb","value":{"message":"An element could not be located on the page using the given search parameters."},"status":7}, request: [method: POST, responseTime: 681.031013, body: {"using":"xpath","value":"//android.widget.EditText[@resource-id='android:id/search_src_text']"}]
14:45:13.265 [ForkJoinPool-1-worker-1] WARN com.intuit.karate.driver.android_1606412685413 - locator failed, will retry once: {"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb","value":{"message":"An element could not be located on the page using the given search parameters."},"status":7}
14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: karate
14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - request:
14 > POST http://localhost:4723/wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element
14 > Accept-Encoding: gzip,deflate
14 > Connection: Keep-Alive
14 > Content-Length: 96
14 > Content-Type: application/json; charset=UTF-8
14 > Host: localhost:4723
14 > User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)
{"using":"xpath","value":"//android.widget.EditText[@resource-id='android:id/search_src_text']"}

14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://localhost:4723][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10]
14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 13][route: {}->http://localhost:4723][total available: 0; route allocated: 1 of 5; total allocated: 1 of 10]
14:45:18.272 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://localhost:4723
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to localhost/127.0.0.1:4723
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:51627<->127.0.0.1:4723
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-13: set socket timeout to 120000
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
14:45:18.273 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> Content-Type: application/json; charset=UTF-8
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> Content-Length: 96
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> Host: localhost:4723
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> Connection: Keep-Alive
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 >> Accept-Encoding: gzip,deflate
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "POST /wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element HTTP/1.1[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "Content-Length: 96[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "Host: localhost:4723[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "Connection: Keep-Alive[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "Accept-Encoding: gzip,deflate[\r][\n]"
14:45:18.274 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "[\r][\n]"
14:45:18.278 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 >> "{"using":"xpath","value":"//android.widget.EditText[@resource-id='android:id/search_src_text']"}"
14:45:18.278 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.279 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-12: Close connection
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-11: Close connection
14:45:18.280 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-10: Close connection
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-9: Close connection
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-8: Close connection
14:45:18.281 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-7: Close connection
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-6: Close connection
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-5: Close connection
14:45:18.282 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-4: Close connection
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-3: Close connection
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-2: Close connection
14:45:18.283 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.284 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager is shutting down
14:45:18.284 [Finalizer] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-1: Close connection
14:45:18.284 [Finalizer] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection manager shut down
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "HTTP/1.1 200 OK[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "X-Powered-By: Express[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "Vary: X-HTTP-Method-Override[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "Content-Type: application/json; charset=utf-8[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "Content-Length: 199[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "ETag: W/"c7-uPOoRthkEAIgdJiAmoxFR1z+9Z8"[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "Date: Thu, 26 Nov 2020 17:45:18 GMT[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "Connection: keep-alive[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "[\r][\n]"
14:45:18.352 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.wire - http-outgoing-13 << "{"value":{"element-6066-11e4-a52e-4f735466cecf":"b5b6bfab-1a68-42e5-8d28-18d3e61b816f","ELEMENT":"b5b6bfab-1a68-42e5-8d28-18d3e61b816f"},"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb","status":0}"
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << HTTP/1.1 200 OK
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << X-Powered-By: Express
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << Vary: X-HTTP-Method-Override
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << Content-Type: application/json; charset=utf-8
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << Content-Length: 199
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << ETag: W/"c7-uPOoRthkEAIgdJiAmoxFR1z+9Z8"
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << Date: Thu, 26 Nov 2020 17:45:18 GMT
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.headers - http-outgoing-13 << Connection: keep-alive
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 13][route: {}->http://localhost:4723] can be kept alive indefinitely
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-13: set socket timeout to 0
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 13][route: {}->http://localhost:4723][total available: 1; route allocated: 1 of 5; total allocated: 1 of 10]
14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - response time in milliseconds: 80,81
14 < 200
14 < Connection: keep-alive
14 < Content-Length: 199
14 < Content-Type: application/json; charset=utf-8
14 < Date: Thu, 26 Nov 2020 17:45:18 GMT
14 < ETag: W/"c7-uPOoRthkEAIgdJiAmoxFR1z+9Z8"
14 < Vary: X-HTTP-Method-Override
14 < X-Powered-By: Express
{"value":{"element-6066-11e4-a52e-4f735466cecf":"b5b6bfab-1a68-42e5-8d28-18d3e61b816f","ELEMENT":"b5b6bfab-1a68-42e5-8d28-18d3e61b816f"},"sessionId":"8add51df-8f67-46a6-a4ad-774232f6d1fb","status":0}

14:45:18.353 [ForkJoinPool-1-worker-1] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $..['element-6066-11e4-a52e-4f735466cecf']
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: karate
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate - request:
15 > POST http://localhost:4723/wd/hub/session/8add51df-8f67-46a6-a4ad-774232f6d1fb/element/b5b6bfab-1a68-42e5-8d28-18d3e61b816f/click
15 > Accept-Encoding: gzip,deflate
15 > Connection: Keep-Alive
15 > Content-Length: 2
15 > Content-Type: application/json; charset=UTF-8
15 > Host: localhost:4723
15 > User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_201)
{}

14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://localhost:4723][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10]
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 14][route: {}->http://localhost:4723][total available: 0; route allocated: 1 of 5; total allocated: 1 of 10]
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://localhost:4723
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to localhost/127.0.0.1:4723
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:51628<->127.0.0.1:4723
14:45:18.356 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-14: set socket timeout to 120000

Appium version: 1.19.0 Node: 12.18.4 xcode: 11.7 sdkmanager: 26.1.1 Android emulator version 30.2.6.0

I tested both on platform iOS and Android, with differents of course locators and without success.

Thanks team

ptrthomas commented 3 years ago

@babusekaran any ideas

babusekaran commented 3 years ago

@arochagabriel I think retry() is what causes the issue, as it is not implemented for mobile. try running without retry() like driver.input()

arochagabriel commented 3 years ago

yeah man @babusekaran I deleted all the retries and it works now, but I had to use delay in some steps, I don't like it, but it works. Thanks, team.

ptrthomas commented 3 years ago

anyone who can help with this ticket please take a look at this also: https://stackoverflow.com/q/65272794/143475

ptrthomas commented 3 years ago

closing because of inactivity

ptrthomas commented 3 years ago

@babusekaran this is a duplicate of #1548 right ?

babusekaran commented 3 years ago

@ptrthomas yes, retry() should now work for mobile which changes in develop branch