Still been having trouble creating a function in python using selenium to click a button on a webpage.
Simply I want to be able to press a button on this page (I assume the xpath is the line in the bottom right)
The solution needs to be able to interact with different sizes and I am not skilled enough in creating the xpath and I have found resources for selenium 4 online to be limited.
I've tried:
driver.find_element(By.XPATH, '//label[@value="US7.5W / US6Y"]').click()
and
driver.find_element(By.XPATH, '//label[@value="US7.5W / US6Y"]/html/body/div[2]/div[3]/div[1]/div/section/div/div[2]/div/div/div[1]/div/div/div[2]/form/div[1]/div[4]/div/div[2]/label').click()
Could anyone please help make one that doesnt give me the "no such element: Unable to locate element" error.
I am using selenium in python 3.9 running on spyder.