I am learning python using Selenium. I would like to know how to enable a check box using python. Please help.
1 Answer
try this
"driver.find_element_by_id("-id here-").click()"
Please go through selenium docs atleast basics.
2 Comments
vinothini baskar
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.
karunakar sapogu
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