-1

enter image description here

I want the bot to click on male But I don't know how I tried to use this, but it didn't work for me

driver.find_element_by_xpath("//input[@name='sex']").click()

I want a command to make the bot click on male in Python.

JaSON
  • 4,843
  • 2
  • 8
  • 15
IFM2
  • 29
  • 4
  • This looks like a previously asked question, take a look at this: https://stackoverflow.com/questions/35470171/click-button-by-text-using-python-and-selenium – jasttim Jul 05 '22 at 11:00

1 Answers1

-1

If you want to click on 'Male' radio-button try

driver.find_element_by_xpath("//label[.='Male']/following-sibling::input[@name='sex']").click()
JaSON
  • 4,843
  • 2
  • 8
  • 15