Comments (6)
The problem with adding this functionality is that a security tag is needed in
the application under test that allows of saving the screenshot. So basically
anyone who wants to use Robotium must add that security permission tag to the
AndroidManifest.xml of the application under test. That is not something that
we can require all Robotium users to do. Thus we have not included this feature
into Robotium.
Original comment by [email protected]
on 16 Oct 2010 at 2:34
- Changed state: WontFix
from robotium.
I actually control the build of my app and I am thinking writing small piece of
code to do this.
Could you please point me to some code to do this.
Thanks a lot for quick updates.
Original comment by [email protected]
on 16 Oct 2010 at 3:08
from robotium.
[deleted comment]
from robotium.
[deleted comment]
from robotium.
[deleted comment]
from robotium.
Hi there i know the answer what i am posting was too late but it would help
someone out there, i got the help form the link
http://softteco.blogspot.com/2011/04/android-take-screenshot.html
If you can't get to the link
just try the below code
// set your location
private static final String SCREEN_SHOTS_LOCATION = "/media/screenshots";
public static void takeScreenShot(View view, String name) throws Exception {
view.setDrawingCacheEnabled(true);
view.buildDrawingCache();
Bitmap b = view.getDrawingCache();
FileOutputStream fos = null;
try {
File sddir = new File(SCREEN_SHOTS_LOCATION);
if (!sddir.exists()) {
sddir.mkdirs();
}
fos = new FileOutputStream(SCREEN_SHOTS_LOCATION + name + "_"
+ System.currentTimeMillis() + ".jpg");
if (fos != null) {
b.compress(Bitmap.CompressFormat.JPEG, 90, fos);
fos.close();
}
} catch (Exception e) {
}
}
Call:
Utils.takeScreenShot(solo.getViews().get(0), getName());
cheers
RanjithkumarRagavan
Enterprise Mobile Developer
ProkarmaSoftech pvt.lt
Chennai
Original comment by [email protected]
on 6 Jan 2012 at 11:18
from robotium.
Related Issues (20)
- Cannot take screenshot on some devices. HOT 1
- Cannot browse to JDK Home with official Sun JDK on Mac Osx 10.10.3 HOT 1
- ConcurrentModificationException when calling Solo.finishOpenedActivities HOT 9
- WaitForView using resource id doesn't return until timeout is reached, even when a match is found HOT 4
- xpath result contains only one html node HOT 1
- Robotium Recorder failing to launch app on mobile device HOT 3
- Cannot Run robotium tests after save HOT 5
- ActivityUtils.getCurrentActivity() fails when dialog-styled activities change orientation HOT 1
- Unable start new Recording HOT 6
- When using Solo.clickOnActionBarHomeButton, can't click on text on the NavigationDrawer HOT 8
- Solo waitForDialogToOpen() continues on shown toast message HOT 1
- Problems to setting date in date picker HOT 1
- clickOnActionBarItem(0x1) is not working. HOT 5
- How to generate the robotium test reports? HOT 2
- Not able to click on ImageView in the list view list item HOT 1
- clickontext dosen't work in listview and orientation of phone is landscape HOT 1
- Robotium 5.3.0 crash problem (ActivityMonitor thread?) HOT 3
- RobotiumWebClient cannot be cast to org.apache.cordova.engine.SystemWebChromeClient HOT 1
- images drawn on Canvas HOT 1
- Is it possible to do Android Robotium with JBehave White box automation using source project? 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 robotium.