testcafestudio-400181-user-interface-code-editor.md
Use the built-in Code Editor to write and modify test scripts. The editor opens when you create a new test script, or open a test script from the Explorer panel.
You can write test scripts in JavaScript, TypeScript, and CoffeeScript. Refer to the Test API documentation for information about test syntax.
The Code Editor includes modern code editing capabilities, such as:
The editor displays two icons next to fixture and test declarations.
When the Action Recording tab is active, the code editor displays a Recording Destination Marker. The marker indicates the location where TestCafe inserts new action code.
Drag the marker to move it up or down.
TestCafe Studio highlights the current line of code during test playback.
When the Selector Inspector tab is active, the code editor highlights a line of code in blue. When you press the paste button, TestCafe places the Selector of your choice on that line next to the caret.
When you pause test recording, the code editor displays the “Test Recording Paused” message where the Recording Destination Marker would normally be.
When TestCafe Studio encounters an error during test playback, it displays the error message under the corresponding line of code.