While mabl allows you to test many web apps and APIs without code, sometimes there are app-specific use cases that aren't supported out of the box. JavaScript snippets offer a way to accomplish tasks for more advanced use cases.
Example of a JavaScript snippet
A snippet is custom JavaScript code that runs in a test. Depending on your requirements, you can save snippets as a one-time snippet or reuse them in other tests. The snippets page - Tests > Snippets - contains a library of your team's reusable snippets, which you can repurpose as needed in other tests.
Snippets by test type
Snippets are supported for browser and mobile tests. The following table outlines capabilities and characteristics for JavaScript snippets by test type:
Test type | Details | JS version | External library support |
Browser |
|
ECMAScript 8 | No |
Mobile |
|
ECMAScript 8 | No |
See our public JavaScript repo for a number of user-created snippets.
Learn more
Check out the following articles for more information on snippets: