###前提・実現したいこと
RubyのMechanizeを使ってform外のbuttonタグをクリックすることはできるのでしょうか?
公式ドキュメントを読んでもbutton系のメソッドはMechanize::Formクラスにしかないので、Form内にあるbuttonタグにはアクセスできますが、Form外にあるbuttonタグにアクセスできるような気がしません。
http://docs.seattlerb.org/mechanize/Mechanize/Form.html#method-i-button_with-21-28criteria-29
具体的には
こちらのhogeクラスのbuttonタグへのアクセスはわかるのですが、
<form name="hoge"> <button type="button" class="hoge">hoge</button> </form>
hoge1クラスのbuttonタグをクリックするにはどうしたらよいでしょうか?
<button type="button" class="hoge1">hoge1</button> <form name="hoge"> <button type="button" class="hoge2">hoge2</button> </form>
バージョン
mechanize (2.7.5)
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。