Im a beginner to python btw.
My goal is to build a very simple ACO bot for supreme. Although im running into a problem and I have not had much luck with solutions.
I tried to use driver.find_element(By.XPATH, "") but this is not exactly possible since the website constantly changes and I would need to always change the name of the product I want.
I tried to use "title", "ID" or "class" but there are multiple items with the same class, title and ID so that does not work. I read that someone doing the same thing as I, was using "PARTIAL_LINK_TEXT" so I tried driver.find_element(By.PARTIAL_LINK_TEXT, "Boxer Briefs"). I tried this by putting in "Boxer Briefs" to see if it would select the "Supreme/Hanes Boxer Briefs as a test. Unfortunately this also did not work, and it give me error saying
selenium.common.exceptions.NoSuchElementException: Message:
this is all of my code, like I said im a beginner and this is a very basic bot.
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Safari()
url = "https://www.supremenewyork.com/shop/all"
driver.get(url)
driver.maximize_window()
click = driver.find_element(By.XPATH, '//*[@id="nav-categories"]/li[10]/a')
click.click()
element = driver.find_element(By.PARTIAL_LINK_TEXT, "Boxer Briefs")
any help would be really appreciated.