I'm trying to make a bot which adds an item to your basket and checks out. I have a problem clicking on the item using Selenium in Python 3.6.5. I want to be able to click on an item based on its alt attribute of the img tag, so "Dek946uiqbq" here.
<img src="//assets.supremenewyork.com/157783/vi/dek946uiQBQ.jpg" alt="Dek946uiqbq" width="81" height="81">
So far I have done this, but it doesn't work:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('https://www.supremenewyork.com/shop/all')
linkElem = browser.find_element_by_link_text('Dek946uiqbq')
linkElem.click()
Am I using the wrong method?