Screenshots are no longer working
Closed this issue · 2 comments
nohe427 commented
I am trying to take a screenshot and get a failure error:
Feature Login in the application > Scenario User can login with valid user name and password[Pixel XL - 7.1.2] FAILED
java.lang.IllegalStateException: Got a context of class class android.app.ContextImpl and I don't know how to get the Activity from it
at com.neoranga55.cleanguitestarchitecture.util.SpoonScreenshotAction.getActivity(SpoonScreenshotAction.java:82)
:app:connectedDebugAndroidTest FAILED
sebaslogen commented
Thanks for reporting. The problem seems that Context from views is no longer a reliable way to access the View's container Activity which is needed by screenshot library, Spoon.
I'll try to find a solution.
sebaslogen commented
I fixed the problem of getting the activity for screenshots and also new problems granting permissions to write images to the storage of the device.
All fixes should be working from commit: 9080ef6