Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6245411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:30:05+00:00 2026-05-24T12:30:05+00:00

I’m testing an internal website built on the Magento storefront. During the checkout process,

  • 0

I’m testing an internal website built on the Magento storefront. During the checkout process, certain parts of the form are hidden (style: none) until the previous section is filled out. These parts would normally break the script, but using when_present for the first element of the hidden form resolved this issue.

The Submit Order button, however, is not working well with these same methods. I worked with our lead developer today to verify that the only difference between this button and the previous form buttons is that a new page is loaded (new URL, new “done” status in the browser).

To be crystal clear:

  1. User enters name, address, email and clicks ‘Continue’ => JS “loading” animation spins while the General panel slides closed and the Shipping Method panel expands, all on the same page.
  2. User clicks ‘Submit Order’ => JS “loading” animation spins, when complete, the browser proceeds to /success/ (new page) with verifiable elements.
  3. If given enough time to complete (sleep statement), the test does pass.

Here is the somewhat-pseudo code for the form, and the Submit click:

def complete_form(data = {})
  data = DEFAULT_DATA.merge (data)
  select_guest
  continue_button.click  #proceed to billing panel
  enter_billing_and_shipping_info(data)
  enter_additional_information(data)

  place_order_button.when_present.click  #submit form
  #sleep 2  #this succeeds, but is undesirable
  thank_you_message.wait_until_present #I do not actually appear to wait until anything is present
end #

def enter_billing_and_shipping_info(data)
  billing_first_name.when_present.value = data['First Name'] #I work!
  billing_last_name.value = data['Last Name']
  #more fields
end #

From Steps:

thank_you_message.should include("Yippee")

The script fails in two different ways depending on how quickly the site is responding:

  1. fail with a message that the expected Thank You message was not found – a screenshot taken during the error shows the Checkout page, NOT the thank you page, with the “loading” animation displayed. (expected “Checkout” to include “Your order has been received”)
  2. fail with the “Element not found in the cache” error – the screenshot in this case does display the Thank You page, containing the text we are looking for

Other methods such as Watir::Wait.until, or until {} do, resulted in the same behavior.

  • Windows 7 64-bit & Windows XP 32-bit
  • ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
  • cucumber (1.0.2)
  • rspec (1.3.2)
  • watir-webdriver (0.3.0)

Update 8-15
Attempted solution #1:

  place_order_button.when_present.click  #complete form
  ajax_submit_image.wait_while_present

Same end result – script terminates with no success message found, screenshot shows the Ajax loading image mid-spin. Both this and the previous method SHOULD work, but seem to have no effect. I did verify that I can access the image using the locators in the script (img src match).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:30:07+00:00Added an answer on May 24, 2026 at 12:30 pm

    Have you considered using the presence of the ‘loading animation’ (which might just be an animated gif or similar) as a way to know you should keep waiting?

    I’ve used that means in some of my scripts where the animation was just a simple graphic file that was being made visible or not by client side javascript. So my wait loop consisted of a brief sleep, and checking to see if the animation was still present, exiting once it had gone away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.