The Record Script screen enables users to capture and generate scripts by recording interactions with a specified URL. It provides options to configure recording preferences and select predefined profiles for script recording.

## API Test

This section allows users to provide input details for recording:

- Enter The URL: the complete URL of the application or API you want to test. Example: https://www.cavisson.com/ Once the URL is entered, click on the Record button to begin capturing the user interactions or API requests.
- Advanced Settings: allow fine-tuned control over recordings by configuring browser options, headers, cookies, scripts, and proxy settings. These ensure accurate, consistent, and reusable test scripts for functional and load testing.
  - Recording Profile
    A recording profile defines how the recording session will be executed.
    - Dropdown: Select a predefined recording profile (e.g., default) from the list.
  - Show: Click to view or edit the details of the selected recording profile. You can configure browser options, i.e caching rules, request/response capture, SSL handling, and more. Profiles help maintain consistency across recordings and allow reuse of common settings.

## Recording Profile Details

- Browser Options: This section provides controls for clearing browser-related data before recording begins. Enabling these ensures a clean environment and avoids interference from cached or previously stored data.
  - Clear Cache: Removes all cached files from the browser before starting the recording session.
  - Clear Cookies: Deletes all cookies to prevent session-related data from affecting the new recording.
  - Clear Local Storage: Clears the local storage data stored by websites.

Note: Incognito mode is automatically activated when all three options (Cache, Cookie, and Local Storage) are selected.

- Split Page Options: This section defines rules to split or segment recorded requests into logical pages. Splitting helps organize the recording and ensures requests are grouped meaningfully.
- Time difference of URL: Allows splitting if the time gap between consecutive URLs is greater than the specified number of seconds.
- Method: Requests are split based on the selected HTTP method(s). Options include:
  - PUT
  - POST
  - HEAD
  - DELETE
- Request Header Contains: Splits requests if the header contains the specified keyword. Example: XmlHttpRequest.
- User Action: Splits requests when a specific user action (e.g., Click) is detected.
- Content Type of Response Header: Splits requests based on the response header content type. Example: Application/Json.
- Browser Test Advanced Options: The LoadTest Browsing Options section provides multiple toggleable settings that allow users to enable or disable specific browser behaviors during recording. By turning these options on or off, users can customize how the browser captures data, processes requests, and simulates end-user interactions.
  - Toggle Options
    - Enable Javascript: Toggle to allow or block JavaScript execution during recording.
    - Image Download: Enable/disable downloading of images while recording.
    - Disable Plugins: Enable to block all browser plugins during recording; disable to allow plugins.
    - Ignore Security Certificate Warnings: Toggle to bypass SSL certificate warnings (useful in test environments).
    - Escape Authentication: Enable to skip authentication prompts, if required.
    - Enable Snapshot Capturing: Toggle to capture browser snapshots during recording.
    - Enable PreSnapshot Capturing: Enable to capture snapshots before requests are executed.
    - Verify SSL Certificate: Enable to validate SSL certificates; disable to skip validation.
    - Capture Request Response: Toggle to record complete request and response data for analysis.
    - Record Mouse Hover UserEvent: Enable/disable capturing of mouse hover interactions.
    - Record Scroll UserEvent: Enable/disable capturing of user scroll actions.
    - Encrypt Sensitive Data: Toggle to encrypt sensitive information such as passwords and tokens in logs.
    - User Agent: Dropdown to select a default or custom user agent string. This controls how the browser identifies itself during recording.
    - Open Browser in Hardware Accelerated Mode: Checkbox option to enable GPU acceleration for improved browser performance.
- Configure Proxy Server for Recording: Configure Proxy Server for Recording allows you to set up proxy server for the recording process, so that internet traffic can be routed through specified proxy settings.
  - No Proxy: Selecting this option would disable the use of any proxy server.
  - Use System Proxy Settings: This option would use the system's default proxy settings for the recording.
  - Use Manual Proxy Settings: This option allows you to configure the proxy manually by specifying the details like the proxy server address and port.

### Advance Setting

- Header Settings
  - URL Pattern: Define which requests this header applies to.
  - Name: Header field name (e.g., A-IM, User-Agent, etc.).
  - Value: Value to assign to the header.
  - Mode (Replace/Append):
    - Replace: Overwrites the existing header.
    - Append: Adds to existing header value.
  - Add button: Saves the header rule.
  - Table below: Lists all added header rules with options to edit or delete.
- Cookies Settings
  - Name: Cookie name.
  - Value: Cookie value.
  - Add button: Saves the cookie rule.
  - Table below: Displays added cookies with options for management.
- Script Settings
  - Keep HTTP Request Body as Inline: Stores request body directly in the flow file if size is below the set KB limit (default = 10 KB).
  - Show HTTP Body in Name Value Pair: Option to view request bodies as key-value pairs.
  - Add Transaction in Recorded Script:
    - Automatic: To add the start and end transactions automatically to all the pages of the recorded script in the flow file for simplifying performance measurement.
    - Manual: To add the start and end transactions manually in the browser during the recording. It helps in providing flexibility for precise transaction control.
  - Record Default Header in Flow File: Checkboxes for common headers (Accept, Accept-Encoding, Keep-Alive, User-Agent, Host, Connection, Referer).

### Header Settings

- URL Pattern: Define which requests this header applies to.
- Name: Header field name (e.g., A-IM, User-Agent, etc.).
- Value: Value to assign to the header.
- Mode (Replace/Append):
  - Replace: Overwrites the existing header.
  - Append: Adds to existing header value.
- Add button: Saves the header rule.
- Table below: Lists all added header rules with options to edit or delete.

### Cookies Settings

- Name: Cookie name.
- Value: Cookie value.
- Add button: Saves the cookie rule.
- Table below: Displays added cookies with options for management.

### Script Settings

- Keep HTTP Request Body as Inline: Stores request body directly in the flow file if size is below the set KB limit (default = 10 KB).
- Show HTTP Body in Name Value Pair: Option to view request bodies as key-value pairs.
- Add Transaction in Recorded Script:
  - Automatic: To add the start and end transactions automatically to all the pages of the recorded script in the flow file for simplifying performance measurement.
  - Manual: To add the start and end transactions manually in the browser during the recording. It helps in providing flexibility for precise transaction control.
- Record Default Header in Flow File: Checkboxes for common headers (Accept, Accept-Encoding, Keep-Alive, User-Agent, Host, Connection, Referer).
- Exclude URL Filters: Enter URL patterns you don't want recorded.
- Custom Selector Attribute: Add special attributes for request/response matching.

### Save Options

- Save As: Save settings as a new profile.
- Save: Save changes to the current profile.
  - Checkboxes for common headers (Accept, Accept-Encoding, Keep-Alive, User-Agent, Host, Connection, Referer)
  - Exclude URL Filters: Enter URL patterns you don't want recorded.
  - Custom Selector Attribute: Add special attributes for request/response matching.

Note : By configuring these options, users can ensure that the recorded script accurately reflects their testing requirements and can be reused for load testing, functional testing, or real-device testing.