Skip to main content

JavaScript Tester

🔗 Original page — Source of this material


Description

This tool allows you to check if your local JS code works correctly. The tester generates code for inserting into an action.

Information

Works only with code executed locally

How do I open the window?

Use the top menu: Tools => JavaScript Tester.

image-20210613-115843

What is this used for?

  • Check your JS before using it in a project
  • Generate code for use in a template

How do I use the window?

image-20200816-153918

  1. Fields for the code you want to check.
  2. The format you need to insert the code in the action ❗→ JavaScript.
  3. The result of the code execution.
  4. Run a test of your code.
  5. Close the tester.
Example

You need to do some math calculations in JS using variables.

Action ❗→ JavaScript and variables.

image-20200816-160835

Before using it in your project, let's run the tester and check that the code syntax and execution are correct.

image-20200816-161811

The tester showed that we wrote the code correctly—just replace the static values with variables and add it to the action ❗→ JavaScript.

image-20200816-161216

Usage Example

Go to the page and run ❗→ JavaScript.

image-20200816-161336

  1. Log in on the website.
  2. Place your code into the tester and check that it works.
  3. Copy the code for your project.
  4. Add the ❗→ JavaScript action in the format from the tester.

So not only do you test your code before using it in your project, but Zennoposter will also tell you in what format it should be added to the action.

  1. ❗→ JavaScript
  2. ❗→ Project variables