One advantage of running your custom code within the browser is that you can interact with the DOM. You can also take advantage of Testim’s Smart Locators to identify items in your app. Additionally, API requests are most likely authenticated (cookies are passed automatically). See Add custom validations and actions.
One of the advantages of running your custom code outside of the browser is that there are no CORS limitations. Additionally, you can use any NPM package available. See Validating using code in Node.js.
Updated 5 months ago