The following is the unedited script generated by the Transaction Recorder for our shopping cart user journey tutorial. If you didn't make your own script using the tutorial, you can use this script to follow along in the testing and editing tutorial.

Use the Toggle to script button in a new transaction monitor to follow along with the editing and testing process.

  1. Copy the code below.
  2. Open the Steps tab on your transaction monitor.
  3. Click the Toggle to script editor button at the top right of the tab.
  4. Paste the code into the editor.
  5. Click Toggle to visual editor.
  6. Go back to the Testing and editing tutorial.

{
  "steps": [
    {
      "name": "Go to start URL",
      "ignoreErrors": false,
      "recordWaterfall": false,
      "actions": [
        {
          "navigate": {
            "url": "https://www.galacticshirts.com/"
          }
        }
      ]
    },
    {
      "name": "GalacticShirts.com - Shop cosmiclicious apparel",
      "ignoreErrors": false,
      "recordWaterfall": false,
      "actions": [
        {
          "click": {
            "element": {
              "css": "li.post-116.product.type-product.status-publish.has-post-thumbnail.product_cat-uncategorized.instock.taxable.shipping-taxable.purchasable.product-type-variable.has-default-attributes > a.woocommerce-LoopProduct-link.woocommerce-loop-product__link > img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail"
            }
          }
        }
      ]
    },
    {
      "name": "\"What Happens\" t-shirt | GalacticShirts.com",
      "ignoreErrors": false,
      "recordWaterfall": false,
      "actions": [
        {
          "set": {
            "value": "l",
            "isPassword": false,
            "element": {
              "css": "#pa_size"
            }
          }
        },
        {
          "click": {
            "element": {
              "css": "#pa_size"
            },
            "description": "Click on an element \"Choose an option\""
          }
        },
        {
          "set": {
            "value": "2",
            "isPassword": false,
            "element": {
              "css": "#quantity_5d3f4b334e9d1"
            },
            "description": "Set element (quantity_5d3f4b334e9d1) to '2'"
          }
        },
        {
          "click": {
            "element": {
              "css": "#quantity_5d3f4b334e9d1"
            },
            "description": "Click on an element (quantity_5d3f4b334e9d1)"
          }
        },
        {
          "click": {
            "element": {
              "css": "button.single_add_to_cart_button.button.alt"
            },
            "description": "Click on a button (Add to cart)"
          }
        },
        {
          "testDocumentContent": {
            "value": "added to your cart",
            "testType": "Contains",
            "description": "Content check"
          }
        },
        {
          "click": {
            "element": {
              "css": "div.woocommerce-message > a.button.wc-forward"
            },
            "description": "Click on a hyperlink (View cart)"
          }
        }
      ]
    },
    {
      "name": "Cart | GalacticShirts.com",
      "ignoreErrors": false,
      "recordWaterfall": false,
      "actions": [
        {
          "set": {
            "value": "1",
            "isPassword": false,
            "element": {
              "css": "#quantity_5d3f4dbc85bab"
            },
            "description": "Set element (quantity_5d3f4dbc85bab) to '1'"
          }
        },
        {
          "click": {
            "element": {
              "css": "button[name=\"update_cart\"]"
            },
            "description": "Click on a button (Update cart)"
          }
        },
        {
          "testDocumentContent": {
            "value": "Cart updated",
            "testType": "Contains",
            "description": "Content check"
          }
        },
        {
          "click": {
            "element": {
              "css": "a.remove"
            },
            "description": "Click on a hyperlink (×)"
          }
        },
        {
          "testDocumentContent": {
            "value": "your cart is currently empty",
            "testType": "Contains",
            "description": "Content check"
          }
        }
      ]
    }
  ]
}