Skip to content

Cant take screenshot after clickOnActionBarItem #579

@renas

Description

@renas

From soul...@gmail.com on August 18, 2013 11:14:23

What steps will reproduce the problem? 1. Call clickOnActionBarItem(resourceId)
2. Call solo.takeScreenshot() What is the expected output? What do you see instead? Although the menu item is clicked and gets the focus, the screenshot is not saved and no error is seen in the logs. My app has the WRITE_EXTERNAL permission. What version of the product are you using? On what operating system? Robotium 4.2 on Android 4.3 (Nexus 4) Please provide any additional information below. I have to take screenshots of my app for my translation team to perform the translations QA. With 10 languages, that's a lot of screenshots using DDMS so I though of using Robotium and automatize this (I know...).

I'm using ActionBarSherlock on my app, so I thought this could be the cause, but after creating a demo project with the stock action bar, I see the same behavior.

After digging a little in robotium's source code and putting a few log.d calls, I found that when a menu is open and the item gets the focus (check attached screenshot1.png), the view returned by getScreenshotView() (ScreenshotTaker.java:75) is always null, but I don't know how to continue from this.

I have attached a zip with 4 projects:

  • RobotiumABS: Simple app with two menus using ActionBarSherlock.
  • RobotiumABSTests: Testing app for RobotiumABS.
  • RobotiumActionBar: Simple app with two menus using the stock Action Bar.
  • RobotiumActionBarTest: Testing app for RobotiumActionBar.

Original issue: http://code.google.com/p/robotium/issues/detail?id=500

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions