Browser Code Execution allows you to run custom JavaScript code directly in the browser context. This is useful for advanced interactions, custom validations, or accessing browser APIs that aren’t covered by standard steps.
// Get the current page titledocument.title// Check if an element is visiblewindow.getComputedStyle(document.querySelector('.modal')).display !== 'none'// Get the value of a custom attributedocument.querySelector('[data-testid="price"]').dataset.value
// Get current URLwindow.location.href// Access local storagelocalStorage.getItem('userToken')// Get viewport dimensionsJSON.stringify({width: window.innerWidth, height: window.innerHeight})
// Calculate total from multiple elementsArray.from(document.querySelectorAll('.price')).reduce((sum, el) => sum + parseFloat(el.textContent.replace('$', '')), 0)