Python 硒蟒蛇';ElementNotInteractiableException';
我正在尝试使用Python 硒蟒蛇';ElementNotInteractiableException';,python,selenium,Python,Selenium,我正在尝试使用idmodel account name input从该帐户向input发送密钥。这是我的密码: 驱动程序。通过_id(“model-account-name-input”)查找_元素。单击()#使其可通过键盘访问 驱动程序。通过\ id('model-account-name-input')查找\元素\发送\密钥('Test')) 使用此代码,我得到以下错误:elementnotinteractiableexception:Message:Element无法滚动到视图中 这是我
id
model account name input
从该帐户向input
发送密钥。这是我的密码:
驱动程序。通过_id(“model-account-name-input”)查找_元素。单击()#使其可通过键盘访问
驱动程序。通过\ id('model-account-name-input')查找\元素\发送\密钥('Test'))
使用此代码,我得到以下错误:elementnotinteractiableexception:Message:Element无法滚动到视图中
这是我想要发送按键的输入图像。
要在文本框中输入文本,请导入
WebDriverWait
,并等待元素可单击()
和下面的ID
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
driver=webdriver.Chrome()
driver.get("https://surviv.io/")
WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.ID,"player-name-input-solo"))).send_keys("Test")
浏览器快照
我在我的位置找不到您提到的ID。但是,如果该ID不起作用,请尝试使用您的ID和相同的代码。