Vasilis Kyrillidis
Vasilis Kyrillidis

Reputation: 1

Cant click this button via xpath

enter image description here

I cant click this button neither class or full xpath my cde:

#checkout page

driver.get("https://www.theathletesfoot.gr/pages/checkout/default.aspx?lang=el")

time.sleep(5)

driver.find_element_("/html/body/div[1]/div[3]/div[2]/div/div/section/form/aside/div[1]/div/div[1]/div/div[1]/div/label").click();

Upvotes: 0

Views: 109

Answers (2)

NictheDEV
NictheDEV

Reputation: 187

The correct XPath should be

//*[@id="chkDisclaimer2"]

Upvotes: 0

Jose
Jose

Reputation: 21

It appears you copied the XPath of the label, instead copy the XPath of the input right above the selected span in your screenshot and replace the XPath in the code.

Upvotes: 1

Related Questions