title: Can I read the label on a button with monkeyrunner
body: <p>In general I want to write a monkeyrunner program that turns on Wifi on my android phone if it's not on already. I have the following code:</p>
  
  <pre><code>from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
  package='com.android.settings'                                          
  activity='.Settings'                           
  component_name=package + "/" + activity                        
  device = MonkeyRunner.waitForConnection()                      
  device.startActivity(component=component_name)
  device.press('KEYCODE_DPAD_CENTER', "DOWN_AND_UP")
  device.press('KEYCODE_DPAD_DOWN')
  device.press('KEYCODE_DPAD_DOWN')
  device.press('KEYCODE_DPAD_DOWN')
  device.press('KEYCODE_DPAD_CENTER', "DOWN_AND_UP")
  device.press('KEYCODE_DPAD_CENTER', "DOWN_AND_UP")
  </code></pre>
  
  <p>This code navigates to the screen where the wifi networks are detected. As I scroll down I want to check to see if the current button is for my network and if it is, and is not turned on, turn it on.</p>
  
  <p>One thought I had was to read the label on the button for comparison. Any help is appreciated.</p>