Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
michaelrshannon opened this issue Jul 27, 2012 · 0 comments

Comments

@michaelrshannon
Copy link

The current logic in the mechanize script is trying to fill in the password fields in the first form on the activate account page. This no longer works, as activate_result_page.forms.first (line 93) selects the search form, and not the new password form (the second form on the page). Because of this, no password is entered, and while the script seems to execute successfully with an exit code 0, no password is in fact submitted, and so Shopify does not activate the customer's account.

I have implemented a fix, for which I will be submitting a pull request shortly.

michaelrshannon added a commit to michaelrshannon/shopify_hacks that referenced this issue Jul 27, 2012
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant