'Is it possible to put Items in your cart on nike.com? (selenium, python)

I know nike can detect when selenium is used but even with undected Chromedriver I still cant put things in my cart. I can click the button but nothing happens. Is there any way to avoid this? item is just an example My Code:

import undetected_chromedriver.v2 as uc
from selenium.webdriver.chrome.options import Options
import time
from selenium.webdriver.common.keys import Keys
options = uc.ChromeOptions()

options.add_argument(r'path/to/chromeprofile')
options.add_argument('--no-first-run --no-service-autorun --password-store=basic')



if __name__ == '__main__':
    
    driver = uc.Chrome(executable_path=r"C:\path\to\chromedriver.exe", options=options)

    driver.get("https://www.nike.com/de/t/everyday-lightweight-crew-trainingssocken-W3ZFQQ/SX7676-100")

    time.sleep(5)


    Size = driver.find_element_by_css_selector('#buyTools > div:nth-child(1) > fieldset > div > div:nth-child(3) > label')
    Size.click()

    time.sleep(2)

    addtoCart = driver.find_element_by_css_selector('#floating-atc-wrapper > div > button.ncss-btn-primary-dark.btn-lg.add-to-cart-btn')
    addtoCart.click()

    time.sleep(5)
    driver.get('https://www.nike.com/de/checkout')


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source