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

Appium tests for Camera plugin should dismiss a native Android cling when accessing gallery app

    XMLWordPrintableJSON

    Details

      Description

      Sauce Labs have updated their Android emulators, so they now have pre-existing images in the gallery as well as a native cling in the "Apps" section of the Launcher.

      This cling interferes with the Camera Appium tests, when they are trying to delete an image from the gallery. (Post-run cleanup).

      http://cordova-ci.cloudapp.net:8080/view/Periodic%20builds/job/cordova-periodic-build/375/PLATFORM=android-4.4,PLUGIN=cordova-plugin-camera/console

       > CALL deviceKeyEvent(4) 
       > POST /session/:sessionID/appium/device/keyevent {"keycode":4}
       > RESPONSE deviceKeyEvent(4) 
       > CALL elementById("Apps") 
       > POST /session/:sessionID/element {"using":"id","value":"Apps"}
       > RESPONSE elementById("Apps") {"ELEMENT":"108"}
       > CALL element.click() 
       > POST /session/:sessionID/element/108/click 
       > RESPONSE element.click() 
       > CALL elementByAndroidUIAutomator("new UiSelector().text(\"Gallery\")") 
       > POST /session/:sessionID/element {"using":"-android uiautomator","value":"new UiSelector().text(\"Gallery\")"}
       > RESPONSE elementByAndroidUIAutomator("new UiSelector().text(\"Gallery\")") {"ELEMENT":"109"}
       > CALL element.click() 
       > POST /session/:sessionID/element/109/click 
       > RESPONSE element.click() 
       > CALL elementByAndroidUIAutomator("new UiSelector().textContains(\"Pictures\")") 
       > POST /session/:sessionID/element {"using":"-android uiautomator","value":"new UiSelector().textContains(\"Pictures\")"}
            ✗ camera.ui.util Delete taken picture from device library
              - Failed: [elementByAndroidUIAutomator("new UiSelector().textContains(\"Pictures\")")] 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.
      
       > CALL quit() 
       > DELETE /session/:sessionID 
      

      This cling should be handled by the tests properly.

        Attachments

          Issue Links

            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: