In a nutshell
The Info task logs the value of an expression as a debugging statement during test execution. It helps testers inspect variable values, verify logic, and understand the flow of test execution as a script runs, all without affecting whether the test passes or fails.
The Info task accepts any expression during test execution, whether a literal value, a variable, or an expression built from constants, operators, or function calls. It displays the evaluated result in the test run's <log>, visible in real time as the test runs and afterward for review. This makes it useful at any point in a script where viewing the actual value helps understand what the script is working with, such as a retrieved text value, a count, or a computed result.
Note: The Info task only logs the evaluated value. It does not alter the page's state, the script's flow, or the test's outcome.info(<message>);
| Parameter | Data Type | Description |
| message | The value to display. It can be a literal value, a variable, or an expression composed of constants, operators, and function calls that evaluates a value of any data type. |
Example 1: Logging the result of an arithmetic expression directly
An expression doesn't need to be stored in a variable before it can be logged as Info can evaluate and log it directly.
// Log the result of adding two numbers using the Info task
info(2 + 3);
// output: 5where:
| 2 + 3 | Expression evaluated and logged directly. |
Combining a search term and its result count into one log line is easier to scan than logging each value separately.
// Create a <variable> 'searchTerm' to store the term entered into the search box
searchTerm = "Chrono 44";
// Create a <variable> 'resultCount' to store the number of results found for that search
resultCount = 3;
// Log a combined summary using the Info task
info("Search term: " + searchTerm + ", Results found: " + resultCount);
// output: Search term: Chrono 44, Results found: 3where:
| resultCount | Variable storing the number of results found. |
| "Search term: " + searchTerm + ", Results found: " + resultCount | Expression combining both values into one readable log line. |
Log a computed expected total before creating an assertion to confirm the exact value it should validate. The assertion then checks against a value the tester has already verified instead of one entered from assumption.
// Create a <variable> 'quantity' to store the number of units being ordered
quantity = 3;
// Create a <variable> 'unitPrice' to store the price of a single unit
unitPrice = 27500;
// Log the computed expected total using the Info task
info("Expected total: " + (quantity * unitPrice));
// output: Expected total: 82500where:
| unitPrice | Variable storing the price of one unit. |
| "Expected total: " + (quantity * unitPrice) | Expression computing and logging the expected total. |
Fetch and log a lease record's status field value in a Zoho Creator Lease Tracker application before using it elsewhere in the script. This confirms the exact value the script is working with.
// Open the Leases report in a Zoho Creator Lease Tracker application using the <Open URL> task
openURL("https://creatorapp.zoho.com/orgname/lease-tracker#Report:Leases", "same window");
// Click the lease record to open it in Detail View using the <Click> task
click(ui.leasetracker.lease-record-row);
// Fetch the lease status field's value using the <Get Text> task
leaseStatus = getText(ui.leasetracker.lease-status-field);
// Log the retrieved value using the Info task
info(leaseStatus);
// output: Activewhere:
| "https://creatorapp.zoho.com/orgname/lease-tracker#Report:Leases" | Leases report URL. |
| "same window" | Opens the report in the window already running the test. |
| ui.leasetracker.lease-record-row | Locator for the lease record row. |
| ui.leasetracker.lease-status-field | Locator for the lease status field. |
| leaseStatus | Variable storing the retrieved status text. |
Before creating an assertion for a product's displayed price, a tester needs to verify the exact text rendered on the page. Even small formatting differences, such as currency symbols or thousand separators, can cause an assertion to fail despite the correct price being displayed.
A tester uses Zoho QEngine to fetch and store the displayed price in a variable, then logs it to the test run's log, so the exact value can be reviewed before creating the assertion.
Steps:
Implementation
// Step 1: Open the Diver Chronomat product page on the ZWatch Commerce website in the same window using the <Open URL> task
openURL("https://zwatch.zohocommerce.com/products/diver-chronomat/3531661000000075722", "same window");
// Step 2: Fetch and store the displayed price in a variable using the <Get Text> task
productPrice = getText("[data-zs-selling-price]");
// Step 3: Log the retrieved price using the Info task
info(productPrice);After searching for a product, a tester needs to know exactly what the results heading displays before asserting its exact text, since a subtle difference such as extra whitespace or a different search term echoed back could otherwise go unnoticed.
A tester uses Zoho QEngine to fetch and store the results heading's text in a variable, log it for review, and confirm that it matches the expected text.
Steps
Implementation
// Step 1: Open the ZWatch Commerce home page in the same window using the Open URL task
openURL("https://zwatch.zohocommerce.com/", "same window");
// Step 2: Click the search icon to reveal the search input using the <Click> task
click(".theme-search");
// Step 3: Enter a search term using the <Set Value> task
setValue("[data-search-input]", "Chrono 44");
// Step 4: Submit the search using the <Send Keys> task
sendKeys("[data-search-input]", [keys.ENTER]);
// Step 5: <Wait> until the results heading becomes visible
wait(10, ".search-results-heading", event.SHOW);
// Step 6: Fetch and store the results heading's text in a variable using the <Get Text> task
resultsHeading = getText(".search-results-heading");
// Step 7: Log the retrieved heading using the Info task
info(resultsHeading);
// Step 8: Confirm the results heading matches the expected text using the <Assert Text> task
assertText(".search-results-heading", "Results for Chrono 44", errorhandling.STOP_ON_ERROR);Consider a Zoho Creator Recruitment Portal application that generates a unique Application ID once a candidate's form is submitted. Before reusing that captured ID to locate the same record elsewhere, a tester confirms it was captured correctly right after submission.
A tester uses Zoho QEngine to fetch and store the generated Application ID in a variable immediately after submitting the form, then logs it to confirm the exact value before using it in a subsequent lookup step.
Steps
Implementation
// Step 1: Open the candidate application form in a Zoho Creator Recruitment Portal application using the <Open URL> task
openURL("https://creatorapp.zoho.com/<orgname>/recruitment-portal#Form:New_Application", "same window");
// Step 2: Enter the candidate's first name using the <Set Value> task
setValue(ui.recruitmentportal.first-name-field, "Jordan");
// Step 3: Enter the candidate's last name using the <Set Value> task
setValue(ui.recruitmentportal.last-name-field, "Lee");
// Step 4: Submit the application using the <Click> task
click(ui.recruitmentportal.submit-button);
// Step 5: Fetch and store the generated Application ID in a <variable> using the <Get Text> task
applicationId = getText(ui.recruitmentportal.confirmation-application-id);
// Step 6: Log the captured Application ID using the Info task
info(applicationId);Previous
Before using the Info task, ensure that you've learned how to measure an element's rendered height using the <Get Element Height> task.
Now that you've learned how to log a value using the Info task, learn how to accept or dismiss a browser alert using the <Handle Alert> task.