我一直在嘗試單擊輸入型別:復選框,但它似乎不起作用。我需要按下其中一個尺寸選項,但是當我使用這段代碼展開 size-picker-form 時:
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()
然后使用這段代碼檢查表單是否位于:
sizelist = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, 'size-picker-form'))) print('I found the size menu!!!')
我看著它運行是因為我非無頭運行,我看到下拉選單展開,所以我嘗試使用這段代碼選擇一個大小:
sizechoice = driver.find_element(By.ID, 'size-picker-JOC12N001-A180150000').click() print('I selected the size!!!')
但我收到錯誤:'selenium.common.exceptions.ElementNotInteractableException:訊息:元素不可互動' 為什么我不能手動點擊大小?什么是正確的做法。這是該網站的鏈接:
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/405007.html
標籤:
