20100826

Augmented Browsing with Ruby Programming Language + Watir Module

Some things on the world wide web cannot be automated easily. The PHP/cURL combination is typically the most convenient and controllable way of automating the web and mimicking a normal web user, but there are roadblocks and obstacles along the way that can prevent you from using that particular type of programming easily.

When I say obstacles, I mean when web developers use sophisticated Javascript or AJAX in their web pages. The cURL library doesn't like this very much, and it is a bit more difficult to read the HTTP protocols necessary to send back to the web server the website is hosted on. In comes augmented Browsing with Ruby/Watir!

What is Ruby?
Ruby is an object-oriented programming language with a bit more power than PHP (a scripting programming language), although arguably a different aim in intentions for web purposes. Ruby nevertheless is growing in popularity amongst web developers, but is still the minority compared to PHP.

What is Watir?
Watir is an automated web browsing testing toolkit. It uses a technique called augmented browsing that allows it to literally and visually drive the Internet Explorer browser on your desktop computer programmatically. Instead of simulating a browser, like cURL, Watir steers the actual browser on your computer with Ruby's built-in OLE and COM support.


Ruby + Watir = Using your internet browser with no hands
Because you are actually controlling a real browser like Internet Explorer, obstacles in websites like funky Javascript and flashy AJAX are much easier to tackle. The problem is augmented browsing with Ruby/Watir is slow as molasses in comparison to PHP/cURL.

FBPoster
This program automated Facebook and didn't have any practical application other than to see how Watir worked, and if I could do it. It could log into your Facebook account, use the search box to look for Facebook groups related to a keyword, then it would post a custom comment of your choice in that group. Only you didn't do it, the software did!
Download FBPoster

GGrouper
Basically allowed you to log into your Google account, and if you have a Google Group set up, you can automatically make new pages in the group based on a set of keywords you give it in a text file.
Download GGrouper

VeohBlack
A bit more complicated than the first two software, VeohBlack made it easy to register accounts at the Veoh video site. It could then use the accounts to search for particular types of videos and make comments on them. It could even click to the next page of videos if you wanted.
Download VeohBlack