Mikrotik chekbox

WebDriver driver = new HtmlUnitDriver();


driver.findElements(By.cssSelector("#content > table.list > tbody:nth-child(41) > tr > td.label > span));

This is selector from Chrome DevelopMode. How to click on this checkbox?

  • Provide your error logs
    – Sagar007
    Commented Jun 23, 2017 at 12:52

1 Answer 1


Please try the following:

driver.findElement(By.cssSelector("span.checkbox input")).click();

As, span tag has a class attribute .checkbox it can be used as above. We need to click the input tag with type='checkbox'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.