简体   繁体   English

发现 selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互

[英]Found selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

Action: Entering password行动:输入密码

Code(Selenium with Python):代码(Selenium 与 Python):

driver.find_element(By.XPATH,"//input[@id='passwordClear1']").send_keys("TPtp123#")

Source Code:源代码:

    ..input type="text" style="display: block;" autocomplete="OFF" maxlength="20" onclick="if (this.value == 'Password') { this.value = ''; }" onblur="if (this.value == '') { this.value = 'Password'; }" value="Password" name="passwordClear" id="passwordClear1" class="txtbox disblk font13 fleft" onfocus="passwordInput1();" tabindex="1"> <input type="password" style="display: none;" autocomplete="OFF" maxlength="20" value="" id="password1" name="password" class="txtbox disnon fleft" onblur="changeInput1();">
    ..input type="submit" value="Login" onclick="PDLogTrackAjax();" class="medimum-btn login-btn font14 fleft" style="border:0px; height:36px; margin-left:8px;" tabindex="0"><br clear="all">

Error:错误:

selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

Please help me for resolving this error.请帮助我解决此错误。

You got to use JavascriptExecutor .你必须使用JavascriptExecutor You can use JavascriptExecutor js=(JavascriptExecutor)driver and Execute the script as the locator contains ajax element.您可以使用JavascriptExecutor js=(JavascriptExecutor)driver并执行脚本,因为定位器包含 ajax 元素。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium.common.exceptions.ElementNotInteractableException:消息:元素在离子框架中不可交互 - Selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable in ionic framework 错误是“selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互” - error is “selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable” 网页抓取:selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互 - Webscraping: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable selenium.common.exceptions.ElementNotInteractableException:消息:使用Selenium和Python插入值时元素不可交互 - selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable while inserting value using Selenium and Python 获取 Selenium 错误 - selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互 - Getting Selenium Error - selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable selenium.common.exceptions.ElementNotInteractableException:消息:使用 Selenium 和 Python 与元素交互时元素不可交互 - selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable while interacting with element using Selenium and Python 随机我收到错误:“selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互:元素大小为零” - Randomly I get the error: “selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable: element has zero size” 硒错误即“selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互” - Selenium error namely 'selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable' Selenium 自动化测试错误:selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互 - Selenium automated testing error: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable selenium.common.exceptions.ElementNotInteractableException:消息:将文本发送到 contenteditable div 元素时元素不可交互 - selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable while sending text to contenteditable div element
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM