title: Clicking on Action Bar Menu Items in Robotium
body: <p>I'm trying to run some automated tests in Robotium. I have the following code in my application which sets up an options menu :</p>
  
  <pre><code>  public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
      com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
          inflater.inflate(R.layout.logoutmenu, menu);
          return super.onCreateOptionsMenu(menu);
     }
  </code></pre>
  
  <p>I try to click on the menu in Robotium using the code :</p>
  
  <pre><code>solo.sendKey(Solo.MENU);
  solo.clickOnView(solo.getView(R.id.share)); //share is the id of the menu item
  </code></pre>
  
  <p>However my tests fail due with the error : </p>
  
  <pre><code>View is null and therefore cannot be clicked.
  </code></pre>
  
  <p>I have also tried using the code below which also failed :</p>
  
  <pre><code>solo.clickOnView(solo.getView(R.id.logoutmenu));
  solo.clickOnMenuItem("Share My Artists"); 
  </code></pre>