title: how to detect a screen change via adb in android
body: <p>I'm looking for a way to detect if a screen changed from previous screen..
  I mean: I have "Screen A" with full of buttons - I'm trying to press all of them, but only 1 of them will take me to "Screen B"..</p>
  
  <p>I'm looking for a way that I could loop through all the buttons and break after reaching "Screen B"  - via adb</p>
  
  <p>I tried looking into <code>uiautomator dump</code> from previous screen and after each click on a button getting the UI hierarchy of the "new" screen and comparing them - but results weren't successful.</p>
  
  <p>Any ideas?
  Thanks</p>