小编Bha*_*ary的帖子

Selenium-ide,文件上传不适用于反应应用程序

使用 selenium ide 为反应应用程序记录测试用例,但无法从 selenium-ide 上传文件。React-dropzone 包用于文件上传。

尝试使用命令“键入”和“发送密钥”,但没有奏效。

硒化物: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 manipulated
Run Code Online (Sandbox Code Playgroud)

selenium ide 能够上传文件并通过测试用例。

file-upload selenium-ide reactjs react-dropzone

3
推荐指数
1
解决办法
1920
查看次数