Martini Running Webpage Templates
Running your Web Page template in Martini allows for immediate feedback on its appearance and functionality in a web browser. This process is essential for iterative development and testing.
How Running a Template Works
- When you run a Web Page template, Martini temporarily exposes it at a randomly generated URL. This URL is your window to view the rendered web page.
- The URL remains active until you stop running the Web Page template.
- Any edits made to a running template automatically refresh the rendered page in the browser.
Methods to Run a Web Page Template
You can initiate the running of a Web Page template through various methods in Martini:
- Navigator Context Menu:
- Right-click on the template in the Navigator and select the option to run.
- Step Editor Context Menu:
- Access the run option by right-clicking within the step editor.
- Editor Toolbar:
- Use the run icon in the step editor's toolbar.
- Keyboard Shortcuts:
- Use designated keyboard shortcuts for quick access.
Setting Template Inputs
- Running a template prompts an input dialog, where you can configure the template's input properties.
- Inputs are adjusted under the Main tab in the Input Model section.
- Importing input data in formats like JSON, XML, or YAML is facilitated through an Import button.
Choice of Web Browser
- You can specify whether the template opens in Martini's internal browser or an external browser of your choice.
Custom CSS and Scripts for Testing
- CSS Customization:
- Paste CSS rules directly or provide a source URL. URLs can be absolute or relative to the Martini package's
web
directory.
- Paste CSS rules directly or provide a source URL. URLs can be absolute or relative to the Martini package's
- JavaScript Inclusion:
- Similar to CSS, inject JavaScript by pasting code or specifying a source URL.
Viewing the Rendered Web Page
- Martini automatically displays a preview of the rendered web page after running the template. This feature can be disabled if not needed.
- If you close the template preview, you can reopen it through the Debug perspective.
By following these steps, you can effectively run and test Web Page templates in Martini, ensuring that your web pages render as intended and function optimally.