Automate Web Surfing / Testing With Chickenfoot 2
I recently discovered a real gem for a task I had at work.
We needed something to automatically surf our web site in a specific manner in order that it pre-compiled the jsp’s etc so users would have ready cached pages to view when the new version of the site launched rather than having to wait for things to compile. The site has 30 country specific domains, is clustered so many different caches needed to be populated too, and for each site there are 10-12 servlets that must be hit so that everything is cached up and ready to go. A very laborious task to do manually!
To complicate matters further, some servlets could not be hit by a direct URL as they were pulled via specific javascripts from specfic pages thus you need to go to Page A and then Page B and then click a specific button. So after some serious googling I hit on a few site testing utilities which were good as long as you were talking about specific url’s, but no use for the more complicated javascript sequences that must be run.
Then I found my saviour! Chickenfoot which is an open source, free Firefox plugin that is built by the good guys at MIT. In a nutshell it is a very simple javascript extension that uses extremely simple syntax to build a script that will navigate your pages in almost any way you want. For example:
go("www.google.com")
openTab("www.google.com")
click("images")
enter("monkeys")
sleep(30)
click("search images button")
So simple I could teach my dog to write such scripts! The only issue I have found is that most actions need to be done on the foremost tab/window, but if you are clever you can do things in such a sequence to work around the limitation. Great work fellas!