joelvh/shopify_hacks — pull request #2 by michaelrshannon (2012-07-27 12:44:17+00:00)
Title: Fix Issue #1 - Changes to order of forms in Shopify's activate account page have broken mechanize_activate_customer_login.rb

Fix Issue #1 - Changes to order of forms in Shopify's activate account page have broken mechanize_activate_customer_login.rb

To try and add a bit of resilience to future undocumented changes made by Shopify, the script will now loop through all the forms on the page, and identify the form which contains the 'password' fields. This will then assign the relevant form to the `activate_form` variable.

While this solution is not completely bulletproof against future changes made by Shopify, it should mean that any future structural changes to that page will not break the mechanize script's functionality.