tags:

views:

41

answers:

1

Hi

It is posible to simulate a browser in ruby?. I know about open-uri, but I mean simulate even the cookies behavior, etc.

+6  A: 

Mechanize is the way to go for basic things like simplifying interaction, holding onto cookies, etc.

For full browser simulation, though, including fancy things like Javascript, we're more limited. A tool like Watir, however, can actually open up the browser and run it as your code dictates, which can sometimes be the only option if interacting with complex Javascript applications is a requirement.

Matchu