Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Mechanize on a page with no form?

Tags:

ruby

mechanize

I am trying to write a website crawler with Mechanize, and I found that my target website is written in a SPA fashion, and although there are a bunch of text fields and buttons, there is no form!

How can I use mechanize to fill text fields and click buttons outside forms?

like image 671
Aetherus Avatar asked Nov 26 '25 20:11

Aetherus


1 Answers

I had the exact same problem you did. I ended up using 'capybara', 'launchy' and 'selenium-webdriver' to do what 'mechanize' would have in non-JavaScript env

like image 75
j.sanghoon Avatar answered Nov 29 '25 15:11

j.sanghoon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!