Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10619

Appium tests fail to switch context to webview on Windows slave's Android emulator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-medic
    • Labels:
      None

      Description

      Here's a log sample

      > RESPONSE init({"browserName":"","appium-version":"1.3","platformName":"Android","platformVersion":19,"deviceName":"Galaxy_Nexus","app":"C:\\Users\\buildbot\\slaves\\apache\\cordova-android-win\\mobilespec\\platforms\\android\\build\\outputs\\apk\\android-debug.apk","autoAcceptAlerts":true}) "7dc6d1dd-d4ef-41aa-ac32-a3400d333e6b",null
       > CALL setImplicitWaitTimeout(10000) 
       > POST /session/:sessionID/timeouts/implicit_wait {"ms":10000}
       > RESPONSE setImplicitWaitTimeout(10000) 
       > CALL sleep(20000) 
       > RESPONSE sleep(20000) 
       > CALL sleep(10000) 
       > RESPONSE sleep(10000) 
      [MEDIC LOG Mon, 15 Feb 2016 07:54:00 GMT] Spec passed: camera.ui.util configuring driver and starting a session
      [MEDIC LOG Mon, 15 Feb 2016 07:54:00 GMT] Starting new spec: camera.ui.spec.1 Saving the picture to photo library
       > CALL context("WEBVIEW") 
       > POST /session/:sessionID/context {"name":"WEBVIEW"}
       > CALL context("WEBVIEW") 
       > POST /session/:sessionID/context {"name":"WEBVIEW"}
       > CALL elementById("middle") 
       > POST /session/:sessionID/element {"using":"id","value":"middle"}
      [MEDIC LOG Mon, 15 Feb 2016 07:59:20 GMT] Spec failed: camera.ui.spec.1 Saving the picture to photo library
      [MEDIC LOG Mon, 15 Feb 2016 07:59:20 GMT] Starting new spec: camera.ui.spec.2 Selecting only videos
       > CALL context("WEBVIEW") 
       > POST /session/:sessionID/context {"name":"WEBVIEW"}
       > CALL context("WEBVIEW") 
       > POST /session/:sessionID/context {"name":"WEBVIEW"}
       > CALL elementById("middle") 
       > POST /session/:sessionID/element {"using":"id","value":"middle"}
       > CALL execute("var info = document.createElement(\"div\"); info.id = \"info\"; document.body.appendChild(info);") 
       > POST /session/:sessionID/execute {"script":"var info = document.createElement(\"div\"); info.id = \"info\"; document.body.appendChild(info);","args":[]}
      An error occured: [execute("var info = document.createElement(\"div\"); info.id = \"info\"; document.body.appendChild(info);")] Error response status: 6, 
      Failing with message: [execute("var info = document.createElement(\"div\"); info.id = \"info\"; document.body.appendChild(info);")] Error response status: 6, 
      [MEDIC LOG Mon, 15 Feb 2016 07:59:20 GMT] Spec failed: camera.ui.spec.2 Selecting only videos
      

      Upon initial investigation I found that it is a bug in chromedriver:
      https://github.com/appium/appium/issues/5616

      It has been fixed in a new chromedriver version but Appium didn't bundle it yet.

      As a temporary workaround we can specify "chromedriverBinary" as a desired capability when starting appium session and point it to a newer chromedriver binary.

        Attachments

          Activity

            People

            • Assignee:
              alsorokin Alexander Sorokin
              Reporter:
              alsorokin Alexander Sorokin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: