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

Camera plugin Appium tests for Android occasionally fail

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Tests occasionally fail to locate camera's shutter or 'Save' buttons.

      [MEDIC LOG Wed, 17 Feb 2016 12:38:47 GMT] Starting new spec: camera.ui.spec.1 Saving the picture to photo library
       > CALL context("WEBVIEW_org.apache.mobilespec") 
       > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
       > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
       > CALL execute("document.getElementById(\"info\").innerHTML = \"Ready for action!\";") 
       > POST /session/:sessionID/execute {"script":"document.getElementById(\"info\").innerHTML = \"Ready for action!\";","args":[]}
       > RESPONSE execute("document.getElementById(\"info\").innerHTML = \"Ready for action!\";") null
       > CALL context("WEBVIEW_org.apache.mobilespec") 
       > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
       > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
      undefined
       > CALL elementById("info") 
       > POST /session/:sessionID/element {"using":"id","value":"info"}
       > RESPONSE elementById("info") {"ELEMENT":"0.30098064825870097-1"}
       > CALL sleep(5000) 
       > RESPONSE sleep(5000) 
       > CALL context("WEBVIEW_org.apache.mobilespec") 
       > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
       > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
       > CALL context("WEBVIEW_org.apache.mobilespec") 
       > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
       > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
       > CALL execute("navigator.camera.getPicture(function (result) { document.getElementById('info').innerHTML = result.slice(0, 100); }, function (err) { document.getElementById('info').innerHTML = 'ERROR: ' + err; },{\"quality\":50,\"allowEdit\":false,\"sourceType\":1,\"saveToPhotoAlbum\":true});") 
       > POST /session/:sessionID/execute {"script":"navigator.camera.getPicture(function (result) { document.getElementById('info').innerHTML = result.slice(0, 100); }, function (err) { document.getElementById('info').innerHTML = 'ERROR: ' + err; },{\"quality\":50,\"allowEdit\":false,\"sourceType\":1,\"saveToPhotoAlbum\":true});","args":[]}
       > RESPONSE execute("navigator.camera.getPicture(function (result) { document.getElementById('info').innerHTML = result.slice(0, 100); }, function (err) { document.getElementById('info').innerHTML = 'ERROR: ' + err; },{\"quality\":50,\"allowEdit\":false,\"sourceType\":1,\"saveToPhotoAlbum\":true});") null
       > CALL sleep(5000) 
       > RESPONSE sleep(5000) 
       > CALL context("NATIVE_APP") 
       > POST /session/:sessionID/context {"name":"NATIVE_APP"}
       > RESPONSE context("NATIVE_APP") 
       > CALL elementByXPath("//android.widget.ImageView[contains(@resource-id,'shutter')]") 
       > POST /session/:sessionID/element {"using":"xpath","value":"//android.widget.ImageView[contains(@resource-id,'shutter')]"}
      An error occured: [elementByXPath("//android.widget.ImageView[contains(@resource-id,'shutter')]")] Error response status: 7, , NoSuchElement - An element could not be located on the page using the given search parameters. Selenium error: An element could not be located on the page using the given search parameters.
      Failing with message: [elementByXPath("//android.widget.ImageView[contains(@resource-id,'shutter')]")] Error response status: 7, , NoSuchElement - An element could not be located on the page using the given search parameters. Selenium error: An element could not be located on the page using the given search parameters.
      [MEDIC LOG Wed, 17 Feb 2016 12:40:11 GMT] Spec failed: camera.ui.spec.1 Saving the picture to photo library
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment