facebook / screenshot-tests-for-android

Generate fast deterministic screenshots during Android instrumentation tests
http://facebook.github.io/screenshot-tests-for-android
Apache License 2.0
1.74k stars 229 forks source link

Scrambled screenshot #235

Closed lwasyl closed 4 years ago

lwasyl commented 4 years ago

Sometimes when I run screenshots, I get scrambled view like this:

image

Seems like it's one tile getting shifted:

image

It is the same also in the recorded screenshot, it's not only issue with HTML preview. It does seem to happen when the text that's being set in edit text (via binding) scrolls

xiphirx commented 4 years ago

You will need to ensure that your view is completely idle before taking a screenshot, otherwise things like this will happen.

lwasyl commented 4 years ago

@xiphirx Actually we're hitting this again, but this time I'm sure everything is idle (according to Espresso). This seems to only happen for contents in a ScrollView, and only when the tested view is not part of an activity's content view. If it is, the issue goes away. Any idea what might be happening here?