title: Perl Mechanize Firefox click button (not in HTML form)
body: <p>Please consider the following code:</p>
  
  <p>I need help clicking the button Quarterly on the web page.</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use WWW::Mechanize::Firefox;
  
  my $mech = WWW::Mechanize::Firefox-&gt;
      new
          (
              create      =&gt; 1,
              activate    =&gt; 1,
              launch      =&gt; 'c:\Program Files (x86)\Mozilla Firefox\firefox.exe',
          );
  
  my $url = 'http://finance.yahoo.com/quote/AAPL/financials?p=AAPL';
  
  $mech-&gt;get($url);
  
  for (1..15)
  {
      last if $mech-&gt;xpath('//[@class="Fl(end)"]', all =&gt; 1);
      sleep(1);
  }
  
  $mech-&gt;click_button(value =&gt; 'Quarterly');
  </code></pre>
  
  <p>The button is located:</p>
  
  <pre><code>&lt;div class="Fl(end)" data-reactid="319"&gt;
      &lt;button class="P(0px) M(0px) C($actionBlue) Bd(0px) O(n)"&gt;
          &lt;div class="Fz(s) Fw(500) D(ib) Pend(15px) H(18px) C($finDarkLink):h Mend(15px) BdEnd Bdc($subTabNavGray) C($actionBlue)"&gt;
              &lt;span&gt;Annual&lt;/span&gt;
          &lt;/div&gt;
      &lt;/button&gt;
      &lt;div class="Fz(s) Fw(500) D(ib) Pend(15px) H(18px) C($finDarkLink):h Mend(15px) C($finDarkLink)"&gt;
          &lt;span&gt;Quarterly&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The page initially loads Annual data, but I'm interested in the Quarterly data.</p>
  
  <p>After the Quarterly data is loaded, I'm interested in capturing the content inside the table <code>&lt;div class="Mt(10px)"&gt;&lt;table class="Lh(1.7) W(100%) M(0)"&gt;&lt;tbody&gt;&lt;tr class="Bdbw(1px) Bdbc($lightGray) Bdbs(s) H(36px)"&gt;&lt;td class="Fw(b) Fz(15px)"&gt;</code> for fundamental analysis.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks!</p>