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 InvalidElementStateException:消息:无效元素状态:元素当前不可交互且不能被操纵_Python_Selenium_Selenium Webdriver_Selenium Chromedriver_Robotframework - Fatal编程技术网

Python InvalidElementStateException:消息:无效元素状态:元素当前不可交互且不能被操纵

Python InvalidElementStateException:消息:无效元素状态:元素当前不可交互且不能被操纵,python,selenium,selenium-webdriver,selenium-chromedriver,robotframework,Python,Selenium,Selenium Webdriver,Selenium Chromedriver,Robotframework,我正在使用SeleniumLibrary for Robot Framework,我确实对输入文本函数的使用存在问题: HTML: 我确实得到了一个错误: InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated 有人能帮我吗?谢谢 您尝试与之交互的Web元素不可单击或已禁用,或者可能不在浏览器的视口

我正在使用SeleniumLibrary for Robot Framework,我确实对输入文本函数的使用存在问题:

HTML:

我确实得到了一个错误:

InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated

有人能帮我吗?谢谢

您尝试与之交互的Web元素不可单击或已禁用,或者可能不在浏览器的视口中。Selenium API仅在活动的可交互webelements上成功。使用Javascript,作为最后一公里的解决方案

我也有同样的问题。我找不到特定窗体上的任何元素

我意识到我可以正常使用表单之外的元素。所以我开始研究html,发现它在iframe

为了解决这个问题,我只需要:


文本框是否灰显或禁用?您是否接受
selenium python
中的答案而不参考
robotframework
?文本机器人既不灰显也不禁用。您可以在那里输入数字,然后它将根据提供的源代码中的格式进行更改。这里有属性
。。data bind=“value:gng.feeValue,disabled:isInputDisabled”
这强烈表明它的功能超出了人们的想象。您是否尝试过在输入之前先单击元素?对于视口,您的陈述不正确。与加载在页面上但需要滚动才能进入视图的元素的交互很难处理,只要它们是DOM的一部分。目前,许多站点在滚动时使用延迟加载将剩余元素加载到DOM中。这是不同的,不应该被误认为是视窗外。
Expected Fee Value - Value

[Arguments]    ${expectedFeeValue}
Input Text   //*[@id="gngFeeValue"]    ${expectedFeeValue}
InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
Select Frame                        xpath=//*[@id="iframe"]