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...
I thought it could be an answer;
browser = Watir::Browser.new(:firefox)
browser.send_keys :tab
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...
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...
**EDIT2: I just solved my second question.
browser.button(:attribute => "same", :index => *).click
this!
Noob Question
2012.5 - 2012.5