Comments (10)
Hi. I found a decision.
- You should add permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- Input in console
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.WRITE_EXTERNAL_STORAGE
3. And now you can take a screenshot
all above i have done .but can't slove the problem
from testing-samples.
Hi @otw,
Can you let me know where to track the permission issue ?
Thanks,
Dino
from testing-samples.
Hi @otw
We use UiAutomator 2.0
to take screenshot, and found this issue again, dependencies as below:
compileSdkVersion 22
buildToolsVersion "25.0.3"
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-annotations:23.1.1'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
Do you have any suggestion to solve this problem, or the higher library has already solved this issue?
Thanks.
from testing-samples.
Thanks for the feedback. Will file a bug on your behalf so we can investigate.
from testing-samples.
I have the same problem
E/UiAutomatorBridge: failed to save screen shot to file
java.io.FileNotFoundException: /sdcard/Pictures/Autotests/1502183344782.png (Permission denied)
with settings
buildToolsVersion = "26.0.0"
supportLibVersion = "25.4.0"
runnerVersion = "1.0.0"
rulesVersion = "1.0.0"
espressoVersion = "3.0.0"
uiautomatorVersion = "2.0.0"
from testing-samples.
I have the same problem,
did this issue fixed or not?
Thanks
from testing-samples.
Hi. I found a decision.
- You should add permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- Input in console
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.WRITE_EXTERNAL_STORAGE
3. And now you can take a screenshot
from testing-samples.
Hi. I found a decision.
- You should add permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- Input in console
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.example.android.testing.uiautomator.your_app android.permission.WRITE_EXTERNAL_STORAGE
3. And now you can take a screenshotall above i have done .but can't slove the problem
I have the same problem
from testing-samples.
do we have a fix for this issue
from testing-samples.
I'd recommend saving the file via TestStorage. Check out the Screenshotsample for an example
from testing-samples.
Related Issues (20)
- Bébé HOT 1
- Cannot run tests with Android Test Orchestrator using `adb` HOT 2
- Could not resolve com.android.tools.utp:android-test-plugin-host-additional-test-output:30.3.1 HOT 1
- `captureToBitmap` clips the image to the device screen size HOT 1
- testInstrumentationRunnerArguments clearPackageData in kotlin dsl and recent gradle HOT 1
- Support test validation on GitHub Actions HOT 2
- instrumentation app can use proguard?
- A
- Test HOT 1
- A HOT 1
- Run HOT 1
- Test HOT 1
- A
- Aa
- A
- My sample
- ScreenshotTestSample with Gradle Manged Devices and several shards generates screenshots for last shard only
- Not compiling test class with a fragment that not inherits directly but indirectly from Fragment class
- Gradle Managed Device not able to run with Orchestrator HOT 8
- [Bazel CI] Error: 'android_instrumentation_test' is not defined with bazel@HEAD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testing-samples.