---
updatedAt: 2025-06-09T23:38:12.000Z
agentTools:
  projectIndex: https://support.speedcurve.com/llms.txt
---

# Simulate a checkout process

```powershell Synthetic Script
logData	0

navigate	https://shop.speedcurve.com/products/1234

exec	document.querySelector('.add-to-cart').click()

navigate	https://shop.speedcurve.com/cart

exec	document.querySelector('.checkout-as-guest').click()

// You can add more steps for completing the user flow here.
// We recommend completing user actions with the "exec" command
// because it is easier to debug in your own browser.

logData	1

execAndWait	document.querySelector('.checkout-submit').click()
```

```json Response Example
{"success":true}
```

# Turn off data logging

<!-- powershell@1 -->

Turn data logging off to ensure that no performance metrics are collected until we navigate to the final page.

# Navigate to the first page

<!-- powershell@3 -->

Navigate to the first page of the user flow. In this case, a product page of a made-up website.

# Add item to cart

<!-- powershell@5 -->

Add an item to the user's cart. In this case you are using 'exec' to execute JavaScript which selects the element and executes the click event to add to cart.

# Navigate to the cart page

<!-- powershell@7 -->

Go to the cart page.

# Click on checkout

<!-- powershell@9 -->

Begin the checkout process by clicking on the checkout element.

# Intermediate Steps

<!-- powershell@11-13 -->



# Turn on data logging

<!-- powershell@15 -->

Turn data logging back on. Performance metrics will be collected from this point onwards.

# Navigate to the last page

<!-- powershell@17 -->

Navigate to the checkout page.