[ 
https://issues.apache.org/jira/browse/CB-10639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159639#comment-15159639
 ] 

ASF GitHub Bot commented on CB-10639:
-------------------------------------

Github user alsorokin commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-camera/pull/177#discussion_r53848875
  
    --- Diff: appium-tests/android/android.spec.js ---
    @@ -1,28 +1,34 @@
    -/*jslint node: true, plusplus: true */
    +/*jshint node: true */
     /*global beforeEach, afterEach */
     /*global describe, it, xit, expect, jasmine */
    -'use strict';
     
     // these tests are meant to be executed by Cordova Medic Appium runner
     // you can find it here: https://github.com/apache/cordova-medic/
     // it is not necessary to do a full CI setup to run these tests
     // just run "node cordova-medic/medic/medic.js appium --platform android 
--plugins cordova-plugin-camera"
     
    +'use strict';
    +
     var wdHelper = require('../helpers/wdHelper');
     var wd = wdHelper.getWD();
     var cameraConstants = require('../../www/CameraConstants');
     var cameraHelper = require('../helpers/cameraHelper');
    +var screenshotHelper = require('../helpers/screenshotHelper');
     
     describe('Camera tests Android.', function () {
    +
    +    var STARTING_MESSAGE = 'Ready for action!',
    +        RETRY_COUNT = 3, // how many times to retry taking a picture 
before failing
    +        MINUTE = 60 * 1000;
    +
         var driver,
    -        startingMessage = 'Ready for action!',
             // the name of webview context, it will be changed to match needed 
context if there are named ones:
             webviewContext = 'WEBVIEW',
    -        // this indicates if device library has test picture:
    +        // this indicates if device library has the test picture:
             isTestPictureSaved = false,
    -        // this indecates that there was critical error and tests cannot 
continue:
    +        // this indecates that there was a critical error and tests cannot 
continue:
             stopFlag = false,
    -        // we need to know the screen width and height to properly click 
on the first image in the gallery
    +        // we need to know the screen width and height to properly click 
on an image in the gallery
             screenWidth = 360,
             screenHeight = 567;
    --- End diff --
    
    No, these values can change when we determining the real device resolution.
    These are just default values.


> Camera plugin Appium tests for Android occasionally fail
> --------------------------------------------------------
>
>                 Key: CB-10639
>                 URL: https://issues.apache.org/jira/browse/CB-10639
>             Project: Apache Cordova
>          Issue Type: Test
>          Components: Plugin Camera
>            Reporter: Alexander Sorokin
>            Assignee: Alexander Sorokin
>              Labels: android, triaged
>
> Tests occasionally fail to locate camera's shutter or 'Save' buttons.
> {noformat}
> [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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to