@sponkly cbf8898b-5012-4782-b543-610ef89659d6-image.png
cf7e154f-0442-4304-ade1-8c25dc9be1c1-image.png
7afc7052-afb2-4d47-84f0-96a73fa688df-image.png
ca4e7a9b-5c8a-4e57-b780-226ff848ab14-image.png
Browser -> Javascript
I have tested it and it works.
https://www.zoho.com/us/books/signup/
// Get a reference to the checkbox element
const checkbox = document.getElementById('tos');
// Check if the checkbox is not already checked
if (!checkbox.checked) {
// Create a click event
const clickEvent = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true
});
// Dispatch the click event on the checkbox
checkbox.dispatchEvent(clickEvent);
}
@DuckDuck said in Bas is unable to click on Check box (I agree btn):
//input[@id="tog_agree"]
Both are not worked for me
When I search with //input[@id="tog_agree"] on Chrome developer tool this path only pointing the check box not selection the box. Please see the image attached.

In the bellow Screenshot you can see when i hover the cursor on ::before == $0 its able to select the box, How can I use xpath for this?
