title: Watir - how to access to an input type = text element generated via Javascript?
body: <p>I'm a new comer to both Ruby (Watir) and Javascript. If an website uses Javascript code that dynamically (by clicking button or such) generates buttons, I have no idea how to access to them. It may have its own name or id, but I even can't check it, since the generated buttons aren't founded on the source code of a web page via browser...</p>
  
  <p>I thought it could be an answer; </p>
  
  <pre><code>browser = Watir::Browser.new(:firefox)
  browser.send_keys :tab
  </code></pre>
  
  <p>until I realized I seem not to have a way to refer to the focused button, even if I set the focus on the target by tab key...</p>
  
  <p><strong>EDIT: Thanks guys. I think it was a noob question now I just face another big problem (all the generated buttons share the exactly same attributes!!, so I can't specify which), but that's another story...</strong></p>
  
  <p>**EDIT2: I just solved my second question.</p>
  
  <pre><code>browser.button(:attribute =&gt; "same", :index =&gt; *).click
  </code></pre>
  
  <p>this! </p>
  
  <p>Noob Question</p>
  
  <p>2012.5 - 2012.5 </p>