Syntax Overview
File Structure
Every vanya file starts with a header declaring the language version and script title:
Vanya test scenario (vanya-lang.org/v0.1)
Script title: "login_test"The Vanya test scenario (domain/version) line declares the language version. The Script title: line provides a name for the test script (used for generated file names).
Indentation
Vanya uses significant indentation (like Python). Blocks are defined by their indentation level:
Within the Browser (plugin: playwright-python, type: browser, url: 'http://localhost:3000') go to "/login" Within the Login Form (type: element, id: 'login_form') Define email-input (label: 'Email') type "user@example.com" into email-input click submit-buttonUse consistent indentation (2 or 4 spaces). Tabs are not allowed.
Comments
Single-line comments start with #:
# This is a commentgo to "/login" # inline commentStrings
Strings can use single or double quotes:
go to "https://example.com"click button (id: 'submit')Keywords
Vanya has the following reserved keywords (all sentence case):
Vanya- file header declarationScript- script title declarationWithin- context block (always followed bythe)Define- alias definitionExport- variable exportCapture- capture a value into a variable