The Script Recorder captures web interactions generating scripts in C, Java, and JavaScript. Users can use WebClickAndScript to record RBU scripts so that it can record any user interaction in the browser like a real browser user. Use Real Device Testing (RDT) to record any application in a real device. At the time of recording any web URL user can also configure the recording profile so that they set how the browser will behave at that time of recording and how the page will be recorded.

## Script Recorder

- Project/Subproject: Projects are the directory where sub-projects are available. Sub-projects are directories where test assets like test suites, scripts, scenarios, etc. are available.
- Name: Users have the flexibility to either input a new script name or use an existing script to record a new flow within the same script.
- Flow Name: Specify the name of the flow or select the existing flow name. After recording the script, a file will be created with a flow name where all the actions performed by the user during recording will be present.
  It is an identifier assigned to a sequence of actions or interactions within a script for reference and distinction.
- Type: Select any of the following types as per the requirement:
  - WebC(HTTP/HTML): This protocol is used to record scripts which are 'C' language syntax based functions using LoadTest APIs. These scripts are recorded as flow files per user session.
  - WebJava(HTTP/HTML): This protocol is used to record scripts which are 'Java' language syntax based functions using LoadTest APIs. These scripts are recorded as flow files per user session.
  - WebJavaScript(HTTP/HTML): This protocol is used to record scripts which are 'JavaScript' language syntax based functions using LoadTest APIs. These scripts are recorded as flow files per user session.
  - WebClick And Script: This protocol is used to record RBU scripts which are 'C' language syntax based. Default browser available for these types of scripts is LoadTest Browser. These scripts are also recorded as Flow files, which contain LoadTest API's per user interaction with different input fields such as input, box, radio button etc.
  - WebClick And Script(Java): This protocol is used to record RBU scripts which are 'Java' language syntax based. Default browser available for these types of scripts is LoadTest Browser. These scripts are also recorded as Flow files, which contain LoadTest API's per user interaction with different input fields such as input, box, radio button etc.
  - WebClickAndScript(JavaScript): This protocol is used to record RBU scripts which are 'JavaScript' language syntax based. Default browser available for these types of scripts is LoadTest Browser. These scripts are also recorded as Flow files, which contain LoadTest API's per user interaction with different input fields such as input, box, radio button etc.
  - Real DeviceTesting(RDT): Real Device Testing (RDT) refers to a mode specifically designed for recording on real mobile devices.
- Browser Type: Choose the appropriate browser type based on the Requirement explained below:
  - LoadTest Browser: LoadTest Browser used for recording the web type script.
    - Recording Profile: By default, the default recording profile is selected. The user can view or modify the profile settings by clicking the' Show' button. Once all changes are made, the user can choose to save the changes to the current profile or create a new one using the Save As button. These settings will be used during the script recording process.
    - Enter the URL: "Enter the URL (e.g.: https://www.example.com/)" prompts users to input a web address following the specified format, enabling navigation to a specific website for recording
  - External or Native Browser: If user want to record the web type script in any other browser or through the native app they can select this option from the dropdown.
    - Page boundary time (in sec): The user can input any page boundary time so that it will generate a new page if the given time is exceeded.
  - RDT Native: Specific to Real Device Testing on native mobile applications.
    - Application Name: The user can select any application that is previously uploaded to record that application in a real device.
    - Upload App: User can upload a new application to record after uploaded the application will be shown in rhe dropdown of "Application Name".

After filling in all these details user can click on record to record the required URL or the application.

## Recording Profile Details

Use the Recording Profile option to create recording profiles where you can save the recording settings for your script. You can create one or more recording profiles and then select a recording profile while recording your script. To create a recording profile:

Configure settings in the Recorder Option section. For example, you can specify the browsing option, script and LoadTest settings, and methods for recording a script. Specify a name for your recording profile in the Recording Profile field.

Browser options: Browser options have the following types:

- Clear cache: Before initiating the browser for recording, any existing cached files and data in the browser's cache will be removed.
- Clear cookie: Cookies will be cleared before recording ensuring that any stored information related to user sessions or preferences is removed. This helps in simulating a new user experience without any pre-existing data.
- Clear Local Storage: Removes the data that websites have stored in the Local Storage of a web browser.

Note: The Incognito mode will be activated once these three options have been selected.

Split Page Options: This option customizes how URLs are treated in the recorded script. Use criteria

like time duration or HTTP methods (POST, PUT, HEAD, etc.) to split the pages and designate the main URL. While recording a script, the page can be split using the below options:

- Time: If the time difference between two URLs exceeds the specified duration, the subsequent URL will be considered as the main URL.
- Method: Inline Url will be categorized as Main URL for selected Methods like POST, PUT, HEAD and DELETE.
- Request Header Contains: If the request contains XmlHttpRequest header then it will treat the request as the main URL.
- User Action: If any user click occurs it will split the page and treat the clicked url as the main url.
- Content type Of Response Header: If the content type of response header is application/JSON it will split the page.

## LoadTest Browsing option

The LoadTest Browser option refers to a specific browsing mode used within performance testing tools, primarily employed for simulating user interactions and conducting performance tests in controlled testing environments.

- Javascript: It enables browser JavaScript, allowing the loading and capturing of Inline Javascript content in the script.
- Image Download: Download images from webpages during recording and capture them as inline requests in the script.
- Disable Plugins: Chromium plugins can be disabled using this option while recording ensuring a streamlined browsing experience.
- Ignore Security Certificate Warnings: Option is used to bypass security certificate warnings during recording allowing access to websites with SSL/TLS certificate issues.
- Escape Authentication: Skip authentication pop-ups during recording providing uninterrupted browsing. It is also to be noted that this may result in unauthorized access.
- Snapshot Capturing: Capture a screenshot of the page after successfully reloading a new URL-enhancing script visualization.
- PreSnapshot Capturing: Capture a snapshot of the previous page visited before loading subsequent URLs aiding in script analysis.
- Verify SSL Certificate: Verifies the authenticity and validity of the SSL certificate used by a website. This verification ensures that the website's connection is secure.
- Capture Request And Response: Captures the incoming requests made to a website and the corresponding responses sent back by the server for thorough script analysis.
- Record Mouse Hover User Event: This option allows the user to capture mouse hover events in WebClickAndScript.
- Record Scroll User Event: This option allows the user to capture scroll events in WebClickAndScript.
- Encrypt Sensitive Data: Enabling this option will encrypt the sensitive user input like password, and credit card details in WebClick and Script recording.

User Agent String: Users can choose the User Agent from the drop-down that will be used in the browser. The Default User agent is Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36.

- Open Browser in Hardware Accelerated Mode: When the option is enabled, the browser renders content using GPU and displays it directly on a surface However, when the option is disabled, browser renders the content using GPU and copies the pixels to RAM.
- If rendering performance is very important for the application, then it is recommended that you use the default Hardware Accelerated mode.

## Configure proxy server for recording

In this section, the user can configure a proxy server for recording. A proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or another resource available from a different server and the proxy server evaluates the request as a way to simplify and control its complexity.

- No proxy: By selecting this option, no proxy is applied to access the web server. This is the default option.
- Use system proxy settings: If the user selects this option, the proxy settings which are set for the system are applied. In case if system proxy is already defined, those settings are loaded for any view/updation. Else, it appears as in the case of manual proxy configuration. Users can configure system proxy settings and save them. System proxy setting would be configurable only from default scenario settings when the user login as Admin.
- Use manual proxy settings: In manual proxy settings, set up the proxy manually. The Manual proxy section contains the following options:
  - Manual proxy configurations
    - HTTP Proxy: An HTTP proxy is a category of network settings that can be configured in the network (or Internet) accessing applications. Specify the HTTP proxy in the following format: http://ip:port. Port number ranges from 1 to 65535. By default, it is 80.
    - SSL Proxy: It routes traffic from a client to a web server using the Secure Sockets Layer (SSL) protocol. SSL is an encrypted protocol that creates a secure connection from one client to another client or server. Specify the SSL proxy in the following format: https://ip:port Port number ranges from 1 to 65535. By default, it is 443.
    - Use Same Proxy Server for Both Protocols: To have same proxy server for both HTTP and HTTPs protocols, select the Use same proxy server for both protocols check box. All protocols are using the same server and port for all the protocols.
  - Exceptions: Exceptions options get enabled in case the Manual proxy configuration check box is selected. To bypass the proxy server for the local address, specify the local address in the No Proxy For text box, for example, 168.1.0/24.
  - Proxy Authentication
    - Proxy authentication credential: The user's credentials are verified here. If the user selects the Proxy authentication credential check box, the user will specify the Username and Password.

# Advanced Setting

## Header Setting

The purpose of the header setting section is to manually specify the header name and its value with the URL pattern. Users can add more than one header in the script. Users can also replace or append the header. In the case of Replace, the specified header replaces the existing header. In the case of Append, the specified header is appended to the existing header. Users can also delete the added header.

## Cookie Setting

The purpose of the cookie setting section is to manually specify the cookie name and its value. Users can add more than one cookie to the script by clicking the More Cookie button.

## Script Settings

- Body Size Option: Keep HTTP Request body as inline in flow file if size is less than the specified value. If the size of the HTTP Request body content exceeds the specified size in the textbox, then the body content will be saved in the newly created file which will be linked to the flow (http_request_body) in the script directory.
- Show HTTP Body in Name Value Pair: If users want the HTTP body in name value pair, they will enable this checkbox.

## Add Transaction in Recorded Script

You can specify the settings for adding a transaction in the recorded script by selecting one of the following options:

- Automatic: Add the start and end transactions automatically to all the pages of the recorded script in the flow file for simplifying performance measurement.
- Manual: Add the start and end transactions manually in the browser during the recording. It helps in providing flexibility for precise transaction control. Each entered transaction has a Status column indicating the state of the transaction. The following Transaction Status is supported:
  - Started: It means the transaction has been started.
  - Ended: It means the transaction has ended.
  - Auto End: It means the transaction automatically ends after the next page.

## Record Default Header in Flow File

While recording, some browser default headers are not recorded which are Accept, accept-Encoding, Keep Alive, User-agent, Host, Connection, and referrer because these headers are added by the browser while sending a request to the server.

In some cases, if the user wants to record headers, such as Referer, and user agent string in the flow file of the script, LoadTest can send only those headers which are present in the flow file of the script. In this case, the user needs to record all headers in the flow file of the script. For this, the Advanced tab for Header recording is implemented in Script Manager GUI.

If the user selects the All check box, All Headers checkboxes are enabled and displayed in the flow file of the recorded script. Users select any of the header checkboxes provided.

## Exclude URL Filter

To exclude any URL from the recorded script, give the URL pattern in the text box. During the recording, any URL that matches the specified pattern will not be included in the recorded script.

## Custom Selector Attribute

In WebClickAndScript, all attributes are automatically recorded and used as selectors by default. However, if the user wants to prioritize a specific selector, they can specify it here.