这是我想要选择“服务实例称为86 ... --Schema”的元素,如UI快照中所示(下面的链接),还没有运气。寻找建议。谢谢。
我尝试了click()和send_keys。
通过click(),错误信息如下:
elem = driver.find_element_by_class_name("react-autosuggest__input")
elem.send_keys("86e13df6-ba3a-4d5e-818c-fcf1b4e8160d")
elem1 = driver.find_element_by_class_name("react-autosuggest__suggestions-container")
elem1.click()
selenium.common.exceptions.ElementNotInteractableException:消息:元素无法滚动到视图中
使用send_keys时,错误如下:
elem = driver.find_element_by_class_name("react-autosuggest__input")
elem.send_keys("86e13df6-ba3a-4d5e-818c-fcf1b4e8160d")
elem1 = driver.find_element_by_class_name("react-autosuggest__suggestions-
container")
elem1.send_keys(Keys.ARROW_DOWN)
elem1.send_keys(Keys.RETURN)
selenium.common.exceptions.ElementNotInteractableException:消息:键盘无法访问元素
Please refer to the GUI element I am trying to click on via selenium, also HTML
答案 0 :(得分:0)
尝试
elem1 = WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.ID, "reach-autowhatever-1")))
elem1.click()
OR
elem1 = WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "react-autosuggest__suggestions-container")))
elem1.click()