[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-camera/pull/244 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93867563 --- Diff: appium-tests/android/android.spec.js --- @@ -373,7 +384,6 @@ describe('Camera tests Android.', function () { return driver .waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 2) .elementByXPath('//android.widget.TextView[@text="Gallery"]') - .elementByXPath('//android.widget.TextView[@text="Gallery"]') --- End diff -- I've tried to find any similar issues but with no luck. Windows: Windows 10 Enterprise, Version 1607, Build 14393.577 Appium: 1.5.0 (maybe even earlier) to 1.6.3 Android SDK Tools (i.e. emulator version) 25.2.2 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93843170 --- Diff: appium-tests/android/android.spec.js --- @@ -21,10 +21,13 @@ * */ -// these tests are meant to be executed by Cordova Medic Appium runner -// you can find it here: https://github.com/apache/cordova-medic/ +// these tests are meant to be executed by Cordova ParaMedic Appium runner +// you can find it here: https://github.com/apache/cordova-paramedic/ // 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" +// for android 5.1, run: +// node cordova-paramedic/main.js --platform android --plugin cordova-plugin-camera --skipMainTests --saucePlatformVersion "5.1" --target api22 --- End diff -- I still think that the user should know better which emulator he wants to use in the test run. For example, one of the emulator may not have camera enabled. I doubt that Appium would know that when selecting "best" emulator. Also please don't forget that `--target` arg specifies not only emulator for Appium tests, but also for our regular "mobilespec" ones. It just seems natural to me that the Appium should use already opened and ready-for-action emulator instead of choosing another one. I'm not against any changes in paramedic, just letting you know how it works right now. ð --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user filmaj commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93798887 --- Diff: appium-tests/android/android.spec.js --- @@ -373,7 +384,6 @@ describe('Camera tests Android.', function () { return driver .waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 2) .elementByXPath('//android.widget.TextView[@text="Gallery"]') - .elementByXPath('//android.widget.TextView[@text="Gallery"]') --- End diff -- Do you have any details around the emulator bug on Windows? Ideally: - any Appium issues filed that sound similar? - any Android issues filed relevant? - Windows version? - Appium version? - Android emulator version? I'm also up for looking into it more closely. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user filmaj commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93797685 --- Diff: appium-tests/android/android.spec.js --- @@ -21,10 +21,13 @@ * */ -// these tests are meant to be executed by Cordova Medic Appium runner -// you can find it here: https://github.com/apache/cordova-medic/ +// these tests are meant to be executed by Cordova ParaMedic Appium runner +// you can find it here: https://github.com/apache/cordova-paramedic/ // 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" +// for android 5.1, run: +// node cordova-paramedic/main.js --platform android --plugin cordova-plugin-camera --skipMainTests --saucePlatformVersion "5.1" --target api22 --- End diff -- So, while that may be how paramedic right now was designed, that's actually counter-productive when working with appium. Appium will actually select the correct emulator (and even start it for you) based on the `platformName`, `platformVersion` and `deviceName` capabilities you provide. These capabilities apply regardless if you are running the test locally or on Sauce Labs. I think, moving forward, for a paramedic refactor I am gathering use cases for / noting issues to address, we would want to expose the appium/selenium capabilities more completely. This would also reduce the difference between local test executions and executions on Sauce Labs, by allowing Appium to worry about managing the emulator, rather than managing it in paramedic. I will change the instructions back, but just a heads up that I think we should change this behaviour in the future. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93737605 --- Diff: appium-tests/android/android.spec.js --- @@ -373,7 +384,6 @@ describe('Camera tests Android.', function () { return driver .waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 2) .elementByXPath('//android.widget.TextView[@text="Gallery"]') - .elementByXPath('//android.widget.TextView[@text="Gallery"]') --- End diff -- Please do not delete duplicate element selections. They are needed to work around the following bug: on Android emulator under Windows, element selection doesn't work the first time on some elements. And sometimes even a second or third time - wrong elements are being clicked. The only way to work around this issue I've found is to select the element multiple times like this. Maybe selecting element by accessibility id could resolve this issue. I'll make a note to myself to look into it a bit later, but for now please leave it as is. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/244#discussion_r93733873 --- Diff: appium-tests/android/android.spec.js --- @@ -21,10 +21,13 @@ * */ -// these tests are meant to be executed by Cordova Medic Appium runner -// you can find it here: https://github.com/apache/cordova-medic/ +// these tests are meant to be executed by Cordova ParaMedic Appium runner +// you can find it here: https://github.com/apache/cordova-paramedic/ // 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" +// for android 5.1, run: +// node cordova-paramedic/main.js --platform android --plugin cordova-plugin-camera --skipMainTests --saucePlatformVersion "5.1" --target api22 --- End diff -- I think `--saucePlatformVersion` is meant to be used together with `--shouldUseSauce` For a local test run, I think it makes sense to use `--target` arg, which specifies the emulator name to run on. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request #244: Android Appium test tweaks
GitHub user filmaj opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/244 Android Appium test tweaks ### Platforms affected Android ### What does this PR do? - updated comments on how to run the tests. - extra comments around functionality at certain points in the automation. - stub of a resolution checker on test startup - still need to figure out acceptable values. - moved session shutdown to an `afterAll` clause. - changed resolution determiner from using webview-based values to using the native windows dimensions. this helps as the webview values may be scaled down intentionally by manufacturers (via changing `window.devicePixelRatio`, for example). furthermore, since the screen dimensions are used purely for native UI automation using direct coordinates, better to use the dimensions reported by the native context rather than the web context. - removed duplicate element calls. ### What testing has been done on this change? Tested on local appium 1.6.3 environment on Android 4.4 and 5.1 stock emulators. ### Checklist - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - [ ] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/filmaj/cordova-plugin-camera android-appium-tweaks Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/244.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #244 commit f4616d88cd1b87433f0f8b98a1d228253be461aa Author: filmaj Date: 2016-12-16T22:33:59Z [Appium] [Android] updated comments on how to run the tests. extra comments around functionality at certain points in the automation. stub of a resolution checker on test startup - still need to figure out acceptable values. moved session shutdown to an afterAll clause. changed resolution determiner from using webview-based values to using the native windows dimensions - this helps as the webview values may be scaled down intentionally by manufacturers (via changing devicePixelRatio). furthermore, since the screen dimension automation is used purely for native UI automation, better to use the dimensions reported by the native context rather than the web context. removed duplicate element calls. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org