In a nutshell
The Click task automates a click on any web element during test execution. It validates that a click produces its intended outcome, such as adding an item to a shopping cart or signing into an account. User interactions in web applications frequently depend on clicks, making the Click task one of the most commonly used actions in web test automation.
The Click task interacts with a web element on a webpage. It applies to elements such as buttons, hyperlinks, checkboxes, and radio buttons. Using Click on one of these triggers actions such as submitting a form, moving to a different page, or opening a menu.
While form action tasks are scoped to a specific element type, Click applies to nearly any interactive element on a web page. This task is often used repeatedly across a workflow, one action after another, with separate assertion tasks confirming the results afterward.

Note:
click(<locator>);
| Parameter | Data Type | Description |
| locator | STRING | Identifies the element to click. Note: Locators can be fetched in one of two ways, either by manually inspecting the webpage for the element, or by using an element already saved through a recording session. Learn more about Elements |
Navigates to the product listing page from the ZWatch Commerce home page by clicking the Shop Now link.
// Open the ZWatch Commerce home page using the Open URL task
openURL("https://zwatch.zohocommerce.com/", "same window");
// Click the Shop Now link using the Click task
click("a[href*='all-products']");where:
| "https://zwatch.zohocommerce.com/" | ZWatch Commerce home page URL. |
| "same window" | Opens the page in the window already running the test. |
| a[href*='all-products'] | Locator for the Shop Now link. |
Clicks the reviews link on the Blue Bay GMT product page to jump to the reviews section, then confirms it's visible with an assertion.
// Open the Blue Bay GMT product page on the ZWatch Commerce website using the Open URL task
openURL("https://zwatch.zohocommerce.com/products/blue-bay-gmt/3531661000000075668", "same window");
// Click the reviews link using the Click task
click("a[href='#zpview_rating']");
// Confirm the reviews section is visible using the Assert Visible task
assertVisible("#zpview_rating", errorhandling.STOP_ON_ERROR);where:
| "https://zwatch.zohocommerce.com/products/blue-bay-gmt/3531661000000075668" | Blue Bay GMT product page URL. |
| "same window" | Opens the page in the window already running the test. |
| a[href='#zpview_rating'] | Locator for the reviews link. |
| #zpview_rating | Locator for the reviews section the link points to. |
| errorhandling.STOP_ON_ERROR | Stops the test if the reviews section doesn't become visible. |
Applying a coupon at checkout by clicking the Apply Coupon button.
// Open the checkout page using the Open URL task
openURL("https://www.<website_name>.com/<checkout_page>", "same window");
// Click the Apply Coupon button using the Click task
click(ui.<checkout_page>.<apply_coupon_button>);where:
| "https://www.<website_name>.com/<checkout_page>" | Checkout page URL. |
| "same window" | Opens the page in the window already running the test. |
| ui.<checkout_page>.<apply_coupon_button> | Locator for the Apply Coupon button. |
A support ticket form, built on Zoho Creator, gets submitted by clicking the Submit button.
// Open the support ticket form in the IT Helpdesk application using the Open URL task
openURL("https://creatorapp.zoho.com/<orgname>/it-helpdesk#Form:New_Ticket", "same window");
// Enter the ticket subject using the Set Value task
setValue(ui.ithelpdesk.ticket-subject-field, "Unable to access shared drive");
// Select the ticket priority using the Select task
select(ui.ithelpdesk.priority-dropdown, "High", select.TEXT);
// Click the Submit button using the Click task
click(ui.ithelpdesk.submit-button);where:
| "https://creatorapp.zoho.com/<orgname>/it-helpdesk#Form:New_Ticket" | Support ticket form URL. |
| "same window" | Opens the form in the window already running the test. |
| ui.ithelpdesk.ticket-subject-field | Locator for the ticket subject field. |
| "Unable to access shared drive" | Subject entered for the ticket. |
| ui.ithelpdesk.priority-dropdown | Locator for the priority dropdown. |
| "High" | Priority selected for the ticket. |
| select.TEXT | Selects the option by matching its visible text. |
| ui.ithelpdesk.submit-button | Stored locator for the Submit button. |
Scenario 1: Navigating to the contact page from the footer
Shoppers with questions about an order or product often look for a way to reach the store directly, usually through a footer link rather than hunting through the main navigation.
A tester uses Zoho QEngine to automate this validation. The test scrolls to the Contact link in the footer, clicks it, and confirms the contact page loads. If the validation failed, a shopper looking for support could be stuck with no working way to reach the store.
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: Scroll to the Contact link using the Scroll To task
scrollTo("a[href='/contact']");
// Step 3: Click the Contact link using the Click task
click("a[href='/contact']");
// Step 4: Confirm the Contact page loads using the Assert Text task
assertText("title", "Contact | Watch Shopping", errorhandling.STOP_ON_ERROR);Search results pages often paginate results across multiple pages, and shoppers rely on a "Next" control to move through them without losing their place.
A tester uses Zoho QEngine to automate this validation. The test scrolls to the Next button, clicks it, and confirms a new set of results loads. If the validation failed, shoppers could get stuck seeing the same results repeatedly with no way to browse further.
Steps
Implementation
// Step 1: Open the shop page in the same window using the Open URL task
openURL("https://www.dailygoods.com/shop", "same window");
// Step 2: Scroll to the Next button using the Scroll To task
scrollTo(ui.shop.next-button);
// Step 3: Click the Next button using the Click task
click(ui.shop.next-button);
// Step 4: Confirm the page number indicator updates using the Assert Text task
assertText(ui.shop.page-number-indicator, "2", errorhandling.STOP_ON_ERROR);Scenario 3: Advancing a candidate to the interview stage in a recruitment application
Consider an organization that uses a Zoho Creator Recruitment Portal application to manage job applicants. Each candidate's record has a custom action button, Move to Interview, on its Detail View. Clicking this button runs a Deluge workflow that updates the record's Status field to "Interview Scheduled" and sends a notification to the hiring manager. A recruiter working from the Candidates report opens a specific candidate's record and clicks this button to move them forward in the pipeline.
A tester uses Zoho QEngine to automate this validation. The test opens the Candidates report, opens the candidate's record, clicks Move to Interview, and confirms the Status field updates accordingly. If the validation failed, a strong candidate could sit unnoticed at an earlier stage with no hiring manager ever alerted.
Steps
Implementation
// Step 1: Open the Candidates report in the Recruitment Portal application using the Open URL task
openURL("https://creatorapp.zoho.com/orgname/recruitment-portal#Report:Candidates", "same window");
// Step 2: Click the candidate's row to open the record in Detail View using the Click task
click(ui.recruitmentportal.candidate-row);
// Step 3: Click the Move to Interview custom action button using the Click task
click(ui.recruitmentportal.move-to-interview-button);
// Step 4: Confirm the Status field shows Interview Scheduled using the Assert Text task
assertText(ui.recruitmentportal.status-field, "Interview Scheduled", errorhandling.STOP_ON_ERROR);