Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshots in android example #548

Closed
aslakhellesoy opened this issue Jun 26, 2013 · 10 comments
Closed

Screenshots in android example #548

aslakhellesoy opened this issue Jun 26, 2013 · 10 comments
Assignees
Labels
📖 documentation Improvements or additions to documentation ⌛ stale Will soon be closed by stalebot unless there is activity

Comments

@aslakhellesoy
Copy link
Contributor

This is an extension of #547.

We should have an after hook that calls scenario.embed to embed a screenshot. The current android formatter just ignores them, but it should be improved so that the screenshots can be accessed on the local filesystem after the run.

Alternatively they could use HTTP to post them somewhere.

@aslakhellesoy
Copy link
Contributor Author

Robotium 4.2 has screenshot capability built-in: http://robotium.googlecode.com/svn/doc/index.html

This should make it easy to embed the image bytes from /sdcard/Robotium-Screenshots/. It can even create animated gifs - very cool.

@ghost ghost assigned mfellner Jun 26, 2013
@SierraGolf
Copy link
Contributor

I would recommend to have a look here: https://github.com/calabash/screenshotTaker

This little helper from the calabash guys works much better, than the one from robotium, with which I had a few issues like:

  • missing background views/images
  • in case of a dialog, just capturing the dialog and not the complete picture

@arunks
Copy link

arunks commented Sep 18, 2013

I am trying to resolve this bug. Max, how do I grab a hold of the failed object when running with cucumber instrumentation?

@mfellner
Copy link
Contributor

@arunks I'm not sure what your mean by "failed object". Inside CucumberInstrumentation, the AndroidReporter is used to report a status back to the Instrumentation. That's where you can find out what the current Feature, Scenario and Step is.

@SierraGolf
Copy link
Contributor

@aslakhellesoy is this just a request to extend the examples or is this about adding functionality to capture screenshots from within cucumber android?

@aslakhellesoy
Copy link
Contributor Author

It's both :-). Would be nice to run the android example and see a report with a screenshot of the UI.

@SierraGolf
Copy link
Contributor

I just discovered the "scenario parameter in hooks"-feature and the Scenario.embed(byte[], Sring) interface. So now I get what you mean by embedding a screenshot. :D

I am unsure if it makes sense to embed such a functionality into cucumber-android, but I will at least provide an example.

@stale
Copy link

stale bot commented Oct 26, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Oct 26, 2017
@stale
Copy link

stale bot commented Nov 2, 2017

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective

@stale stale bot closed this as completed Nov 2, 2017
@lock
Copy link

lock bot commented Nov 2, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📖 documentation Improvements or additions to documentation ⌛ stale Will soon be closed by stalebot unless there is activity
Projects
None yet
Development

No branches or pull requests

4 participants