i have to click the input type="button" element of the first li, but i can not refer to the id of the li, since it changes every time i i open the website, this is what i tried
driver.find_elements_by_xpath('//input[data-componentname="gender"]').get(0).click()
and it gives me this error:
AttributeError: 'list' object has no attribute 'get'
if i remove the get part, this is the error:
AttributeError: 'list' object has no attribute 'click'
This is the code, like i said, i have to click the first input without referring to the id
<ul data-componentname="gender">
<li id="78ece221-1b64-4124-8483-80168f21805f" class="">
<input type="button">
<span>Uomo</span>
</li>
<li id="2678a655-b610-41e0-8e7f-bad58fbcb1b3" class="">
<input type="button">
<span>Donna</span>
</li>
</ul>