首页 > 解决方案 > 机器人框架 | 选择文件 | 角 | 不工作

问题描述

我不知道如何使用“选择文件”功能

我有以下网站,我想在其中上传文件 C://RobotAutomation/Customers/in/test.csv

该网站如下所示

在此处输入图像描述

对应的html如下:

在此处输入图像描述

我在 RobotFramework 中的测试脚本如下:

Click Button   xpath=//button[@name='file']
Sleep 5
Choose File  xpath=//button[@name='file']  C://RobotAutomation/Customers/in/test.csv

结果是打开了文件对话框,但它不会自动填充 test.csv 文件。

我不确定是否指定了正确的定位器。这是因为使用了 Angular 代码。

我在这里做错了什么?

标签: angularrobotframeworkfiledialog

解决方案


试试这种方式,对我有用 C:\\RobotAutomation\\Customers\\in\\test.csv


推荐阅读