为react应用程序使用selenium ide记录测试用例,但无法从selenium-ide上传文件。React-dropzone包用于文件上传。
尝试使用命令"type“和"send key”,但不起作用。
硒化物: 3.6.0铬: 74.0.3729.108
尝试使用firefox,但收到错误信息“此时只支持Chrome中的文件上传”
Command: type
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: {"code":-32000,"message":"Not allowed"}
Command: send keys
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: Element is not currently interactable and may not be manipulatedElement is not currently interactable and may not be manipulatedselenium能够上传文件并通过测试用例。
发布于 2019-09-03 23:28:35
在Chrome上,您可以转到:窗口>更多工具>扩展> Selenium IDE >详细信息
然后打开“允许访问文件URL”选项。
我也有同样的问题,这对我很有效。
https://stackoverflow.com/questions/55917893
复制相似问题