I have checked on stack overflow and other websites to find the solution to my problem but nothing is working. p This was the closest solution I could fine but it didn't work How to click href javascript:void(0) and hidefocus=true with selenium python?
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
from selenium.webdriver.common.action_chains import ActionChains
if __name__ == '__main__':
driver = uc.Chrome(version_main=106)
driver.get("https://sneakernews.com/air-jordan-release-dates/")
#
# WebDriverWait(driver, 30).until(
# EC.presence_of_element_located((By.CSS_SELECTOR, "div[class='content-box']"))
#
# )
WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//a[@id='sneaker-release-load-more-btn']"))).click()
WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.ID, ".//div[@class='more-button']/div/a[@id='sneaker-release-load-more-btn']")))
jordan_names = driver.find_elements(By.ID,".//div[@class='more-button']/div/a[@id='sneaker-release-load-more-btn']")
print(jordan_names)
Could you please give me a direct solution that actually works for this particular example because I have spent many hours on this.