Run custom code inside DoesQA
DoesQA includes thousands of codeless node configurations designed to handle the vast majority of real world testing scenarios.
But when you need something more specific, you can extend your tests with custom JavaScript using the Run Browser Script node.
This allows you to execute code directly in the browser at any point in your automated flow.
You can:
Return a value to store and use later in the test
Perform advanced assertions
Manipulate the DOM
Create dynamic logic based on runtime conditions
This gives you full flexibility without sacrificing the structure and clarity of your visual test builder.
Practical use cases
The Run Browser Script node is ideal for scenarios such as:
Asserting a custom sorting algorithm
Performing advanced calculations on stored values
Returning a random date within a specific range
Generating complex or unique test data
Comparing multiple elements in a single operation
Creating bespoke validation logic specific to your application
You get the control of code, embedded directly into your visual, branching test architecture.
Flexible without adding maintenance overhead
Custom code runs as part of your DoesQA test flow, meaning you still benefit from:
Managed runners
Clear failure context
Branching logic
Centralised reporting
You can extend behaviour where needed, without turning your entire test suite into a framework that needs constant maintenance.