Description

The Guest Checkout test ensures guest customers can visit your store, place items in the cart, fill in their billing details (address, shipping method and payment method) and successfully complete the checkout.

During this test, Robot Ninja will do the following:

  • add products to the cart (see the doc on Selecting Products for more information on which products are added to the cart and how you can choose a product to be tested)
  • navigate to the checkout page and fill in the billing address details for the address: 959 Market Street, San Francisco
  • try to select an available shipping method if one is not already checked
  • choose a valid payment method which will allows credit card details to be filled in
  • fills in the credit card numbers and places the order

To confirm that the product was successfully purchased, Robot Ninja will try to look for evidence that the guest reached the Order Thank-You Page and then use the API to look for a new order for our test customer. Once it's certain an order was created, Robot Ninja will trigger a refund on the order and delete it.

Selectors

The following list of selectors will only list those relevant to the guest checkout test after the products have been added to the cart and the checkout page has been loaded. You can find the selectors used for adding products to the cart and testing the checkout page has loaded in the Add Products to Cart and Checkout Loads doc.

  • WooCommerce billing fields body  -  We look for class name: woocommerce-billing-fields 
  • Billing first name field - We look for ID: billing_first_name
  • Billing last name field - We look for ID: billing_last_name 
  • Billing company text field - We look for ID: billing_company 
  • Billing email text field - We look for ID: billing_email 
  • Billing phone text field - We look for ID: billing_phone 
  • Billing country field - We look for ID: billing_country (we currently expect this to be a dropdown)
  • Billing address text field - We look for ID: billing_address_1
  • Billing city text field - We look for ID: billing_city
  • Billing state field - We look for ID: billing_state  (we current expect this to be a dropdown)
  • Billing postcode field - We look for ID: billing_postcode 
  • Account password field - We look for ID: account_password 
  • Available shipping methods - We look for class name: shipping_method 
  • Available payment gateways - We look for class name: payment_method
  • Individual payment gateway selection - We use CSS Selector: label[for=payment_method_{method_id}]
  • Credit Card Fields - We look for class names: {method-id}-card-number , {method-id}-card-expiry , {method-id}-card-cvc
  • WooCommerce terms and conditions body element - We look for class name: wc-terms-and-conditions
  • WooCommerce terms and conditions checkbox - We look for ID: terms
  • WooCommerce checkout block overlay - We look for class name: checkout-page-block-overlay 
  • Checkout place order button - We look for ID: place_order 
  • WooCommerce order recieved page - We look class name woocommerce-order-received 

Test Skipped

If Robot Ninja marked this test as skipped there's a few reasons for this. First take a look at the error message for more information on why the test was skipped. Here's a list of reasons why the Guest Checkout test would have skipped:

Guest checkout was disabled on your store at time of testing.

The Guest Checkout test requires your store to has enabled the setting for "Enable guest checkout". If your store has this setting switched off, the Guest Checkout test will skip.

Robot Ninja is unable to run the guest checkout test because the guest customer was unable to be removed.

Before running the Guest Checkout test, Robot Ninja makes sure the guest customer email (store+guest-{ID}@robotninja.com) doesn't already belong to an existing customer on your store.

If there was an error cleaning up this customer, the guest checkout will be skipped. If you see this message, please contact us: support@robotninja.com

Robot Ninja was unable to run this test because your store does not have a checkout page set in WooCommerce > Settings > Checkout.

Robot Ninja will skip this test if your store doesn't have a Checkout Page set in  WooCommerce > Settings > Checkout.

Test Failed

Here's a list of errors that can cause the Guest Checkout test to fail and ways to fix or workaround them. If there's a test that is failing and you think it shouldn't be, please email us (support@robotninja.com) and we'll have a look for you.

Robot Ninja could not find any billing fields on the checkout page (CHECKOUT URL) as a guest customer with class name woocommerce-billing-fields

If you're seeing this message, it's likely your checkout page hasn't been loaded properly or is possibly too customized for Robot Ninja to handle out of the box.

  1. If Robot Ninja has provided a screenshot, first check that the screenshot shows the checkout page and check the billing details are loading properly. If there's no billing details, please try visit your store has a guest customer (not logged in) and add a few products to the cart and try visit the checkout page to diagnose if there's no fatal errors or display issues occurring on your store.
  2. If the screenshot provided by Robot Ninja looks perfectly fine, it's possible that Robot Ninja is looking for the wrong element. By default Robot Ninja looks for all the billing fields within the element found by class name `woocommerce-billing-fields`. If your store uses something different from this, custom selectors will fix this issue.
  3. If your checkout flow is a multi-step process and the billing fields are hidden behind the second step (for example), please contact us in support and we'll see if we can workaround this for you.

Robot Ninja tried to click the ' . $checkout_field_key . ' field on your checkout page (CHECKOUT URL) but it was being covered by some other element (see screenshot for more details).

Seeing this error message means Robot Ninja tried to click on a billing field and type in the guest customer's address, but something was blocking the field. A common reason for seeing this error is if your store has a popup or some sort of up sell campaign and it's blocking the user from clicking on the billing fields and filling them in. You can use the screenshot to find out if this is the case. If it is, you may be able to stop the up sale/pop-up from displaying for certain customers or user agents. If this is the case, please contact us in support for assistance if needed: support@robotninja.com

 There are a large number of failures that can occur during the Guest Checkout test and not all are listed above. If your test is failing and error message is not listed above, please contact us for further assistance: support@robotninja.com.

Robot Ninja could not find any payment methods when looking for elements with the name payment_method. Make sure your store has at least one payment gateway enabled which accepts credit card (we recommend stripe and stripe in test mode if you have a staging site).

If the Guest Checkout test results in this error, make sure your store has at least one payment gateway enabled and it's available for customers in the US. Seeing this means that no payment methods were found.

If your store is using an uncommon payment gateway, it's possible the gateway is being loaded on the checkout differently.
By default, Robot Ninja expects the payment options to be loaded on the checkout and have the name attribute set to payment_method

While on the checkout page (CHECKOUT URL) as a guest customer, Robot Ninja was unable to find and click the place order button when looking for an element with ID place_order. 

There are a number of reason why you could be seeing this error:

  1. First check if there's an available screenshot to help diagnose why the place order button was not successfully clicked. If the place order button is not clickable (i.e. not visible or disabled) because the checkout wasn't filled in correctly that could be causing this error to occur.
  2. Use the screenshot (if available) to find out if the checkout is still loading/calculating and WooCommerce has blocked the place order button. Robot Ninja tries to wait for the overlay to disappear before interacting with the page, but sometimes it can take longer than expected.
  3. If your theme uses a different selector for the place order button, then Robot Ninja won't be able to find and click it and is causing this error to be thrown. Please contact us in support (support@robotninja.com) and we'll tell Robot Ninja to look for a different element using our custom selectors feature.

After completing the checkout and pressing the place the order button, Robot Ninja found that no order was created in your store.

If you see this error, this means Robot Ninja has tried to check if an order was created on your store between when the test first started and when the test ended, but it couldn't find any orders.

There are a number of reasons you could be seeing this:

  1. First use the screenshot to help diagnose what caused the issue. Here are some common reasons this error might occur: insufficient funds on your test card, card details weren't filled in properly, no valid payment option were selected, the value typed into one of the billing fields was invalid, terms and conditions wasn't properly checked. If you're seeing the error because of test card funds issue please contact us for more assistance: support@robotninja.com
  2. If your checkout has a custom field that is required, Robot Ninja won't fill this field in and will stop the order from being created until it's properly filled in a validated. If you a custom field, please contact us in support to discuss possible fixes: support@robotninja.com
  3. If Robot Ninja failed to communicate with your store via the API (i.e. keys revoked, unauthorized access), it will return this error because it couldn't confirm the order was created. If this is the case please contact us: support@robotninja.com

Customized Checkout Experience

It's important you know that we've built this test with the intention of it working on the majority of WooCommerce stores out there. If you have customized WooCommerce or have purchased a theme that changes WooCommerce in a very unique way, then it's possible that this test doesn't work out of the box for you. If this is the case please contact us (support@robotninja.com) and we'll do our best to get the tests working alongside your customizations.

Did this answer your question?