There are 7 unselected check-boxes available in application. How to select first and last checkboxes and how to select all checkboxes from reverse order using python selenium webdriver?


2 Answers 2


I can give you the logic in java, you can try and convert it into python.

//for clicking 1st checkbox
//for selecting 2nd checkbox

You can also use other attributes like ID, class if they are available. You can use similar logic for selecting all the other checkboxes with whatever order you want to click them.


You can find multiple elements with driver.findElements (or whatever it is in python). Once you have the list with the checkbox elements in it, it's rather trivial to check (select) them anyway you want. Just make sure that the elements are in order.

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.