Home > Net >  How to click a input type=checkbox from an aria-expanded menu using selenium python?
How to click a input type=checkbox from an aria-expanded menu using selenium python?

Time:01-06

i have been trying to click an input as type: checkbox but it doesn't seem to work. I need to press one of the size options but when i expand the size-picker-form using this piece of code:
sizelistspot = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, '//*[@id="picker-trigger"]'))) sizelistspot = driver.find_element(By.XPATH, '//*[@id="picker-trigger"]').click() and then use this piece of code to check if the form is located:

sizelist = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, 'size-picker-form'))) print('I found the size menu!!!') I watch it run because i run non-headless and i see the dropdown menu expand so then i try to select a size with this piece of code:

sizechoice = driver.find_element(By.ID, 'size-picker-JOC12N001-A180150000').click() print('I selected the size!!!') But i recieve the error: 'selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable' Why can't i click the size whilst i can manually? And what is the right way to do it. This is the link to the site: enter image description here

  •  Tags:  
  • Related