我正在将 SeleniumLibrary 用于 Robot Framework,但我确实遇到了有关输入文本功能的问题:
HTML:
<div class="form-group">
<label class="col-sm-6 control-label" for="gngFeeValue" >What is the expected Fee Value?</label>
<div class="col-sm-4">
<input id="gngFeeValue" data-role="numerictextbox"
data-format="###,###,###,###,###,##0"
data-decimals="0"
data-spinners="false"
data-bind="value: gng.feeValue, disabled: isInputDisabled" placeholder="Enter fee value" />
</div>
</div>
TEST.机器人:
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
任何人都可以帮助我解决这个问题?谢谢!
最佳答案
我有同样的问题。我在特定表单上找不到任何元素。
我意识到我可以正常使用表单之外的元素。于是我开始研究html,发现它在一个里面。 iframe .
为了解决这个问题,我只需要 SeleniumLibrary Select Frame :
Select Frame xpath=//*[@id="iframe"]
关于python - 无效元素状态异常 : Message: invalid element state: Element is not currently interactable and may not be manipulated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48373198/