Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/346.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 硒蟒蛇';ElementNotInteractiableException';_Python_Selenium - Fatal编程技术网

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和相同的代码。