I was trying to scrape this URL and trying to navigate the next Brand list on the website. I use selenium click by.XPATH and got the error TypeError: 'str' object is not callable
,
this is the code I executed
for i in soup.find_all('div', class_='ShopBrandsAlphabetically-brandLink'):
title = i.find('a', href = True)
results.append(title.text.strip())
time.sleep(2)
driver.find_element(By.XPATH("//button[@name='0-9']")). click()
and this is the webpage element
<button name="0-9" value="0-9" type="button" data-hb-id="Button" class="_1vl5e1z1_713 _1vl5e1z2_713 _1vl5e1z6_713 _1vl5e1z9_713 _1vl5e1z11_713"><span class="_1vl5e1zd_713 _1vl5e1z12_713 _1vl5e1z16_713 _1vl5e1z18_713"><span class="ShopBrandsAlphabetically-filter"><p data-hb-id="Text" class="j3rpje110_713 nhya890_713" style="--j3rpje10w_713:inherit">0-9</p></span></span></button>
can anyone tell me where's my mistake?