-1

I am learning python using Selenium. I would like to know how to enable a check box using python. Please help.

1

1 Answer 1

1

try this

"driver.find_element_by_id("-id here-").click()"

Please go through selenium docs atleast basics.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you karunakar.Selenium does not capture that element's ID, so i tried with both Xpath and Css Selector. I am getting an error message.
if you are getting No Such Element exception then you should try to find out where the element is located, there are certain possibilities like, the element may be in hidden class or the element may be in mouse hover, or the element is taking time to get located, or the element is in frame like that, we can judge correctly by seeing in html script too.. Sometimes elements are defined in a locations which have common parent names, so the webD cant locate them, so you should be specific to provide the path, if still doesnt work try to use page source

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.