Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rotateDevice(Orientation.LANDSCAPE);
- closeSoftKeyboard();
- assertActionBarTitle(getString(R.string.demo_activity_title));
- assertButtonsAreDisplayedInScrollView(mExpectedDisplayedButtonIds);
- saveScreenshot();
- Bitmap bitmap = InstrumentationRegistry.getInstrumentation().getUiAutomation().takeScreenshot();
- File screenshotFile = getScreenshotFile();
- try (FileOutputStream outputStream = new FileOutputStream(screenshotFile)) {
- bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);
- Log.i(mTag, "Saved screenshot: " + screenshotFile.getAbsolutePath());
- } catch (IOException e) {
- Log.e(mTag, "Could not save screenshot", e);
- }
- Handler handler = new Handler();
- private Runnable sendData=new Runnable(){
- public void run() {
- handler.postDelayed(saveScreenshot, 1000);
- }
- };
Add Comment
Please, Sign In to add comment