1

I'm trying to select a checkbox on the following public web-page using Selenium XPath from Python and click it to change the checked status.

http://simbad.u-strasbg.fr/simbad/sim-fout

For example, the checkbox that I would like to click is located under "Fluxes/Magnitudes" and is named "U" shown in the picture below.

Upon inspection of this page I built the following XPath to select the checkbox:

//*[@type ='checkbox' and @name='U'] 

This returns what I believe to be the correct element, however when I try to run click() on the object it fails with the exception 'list' object has no attribute 'click'

When I look at the functions for this object in a debugger it indeed does not have a click function.

How can this be true for a checkbox?

Is there a different element that has to be selected?

Thanks!

enter image description here

IAmMilinPatel
7,7667 gold badges44 silver badges68 bronze badges
asked Aug 18, 2021 at 16:08

1 Answer 1

0

My bad, I was using find_elements_by_xpath instead of find_element_by_xpath

Copy paste error from using another line of code

Kate Paulk
31.5k8 gold badges56 silver badges109 bronze badges
answered Aug 18, 2021 at 21:40
1
  • 2
    Hi, Brian. You could improve your question by including the code you were using since only you could have answered with the information you posted. Commented Aug 19, 2021 at 11:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.