Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for循环 #41

Open
wanghaisheng opened this issue May 26, 2022 · 7 comments
Open

for循环 #41

wanghaisheng opened this issue May 26, 2022 · 7 comments

Comments

@wanghaisheng
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

比如一个文件列表,怎么循环获取每个的下载链接,最后保存到本地?

@clgwlg
Copy link
Contributor

clgwlg commented May 26, 2022

通常列表数据,是通过网络请求传输的,可以通过网络监听,把数据保存下来。
v0.2.3版本中,增加了相关的DSL

@wanghaisheng
Copy link
Author

通常列表数据,是通过网络请求传输的,可以通过网络监听,把数据保存下来。
没有太懂这个
相应的,文件数据的批量导入呢

@clgwlg
Copy link
Contributor

clgwlg commented May 26, 2022

关于文件数据的批量导入, 可以列举一个具体的场景么?

@wanghaisheng
Copy link
Author

比如一个视频音频分享网站,可以供给up主上传分享视频,音频,
默认登录进入后台,点击上传按钮,进入dialog,拖动单个/多个文件到区域内,或者点击选择本地文件夹下的单个多个文件,文件提交成功进入配置界面,设置标题,设置标签,设置缩略图,点击发布。
诸如此类

@clgwlg
Copy link
Contributor

clgwlg commented May 26, 2022

文件上传,现在还没有提供DSL,PlayWright有相关的API,后续版本中,可以考虑增加支持。
关于批量数据的处理,业内也称为数据驱动,即提供数据列表,由脚本去重复做同一件事情,框架中提供了支持,参考下面这个例子

功能: 乘机人模块

场景大纲:  外露乘机人_选择列表页乘机人
        跳转页面到[单程填写页]
     那么 页面渲染完成出现元素[已选乘机人姓名]
     那么 <element>的文案为<title>
     那么 存在[乘客类型标签儿童]的元素
     那么 返回上一页

     例子:
        |   element          |   title      |
        |   选择乘机人文案     |   选择乘机人   |
        |   已选乘机人姓名     |   李易峰      |
        |   已选乘机人证件类型  |   护照       |
        |   已选乘机人证件号    |   YHE77     |

@wanghaisheng
Copy link
Author

那么 页面渲染完成出现元素[已选乘机人姓名]

类似这种也能捕获吗
firefox_99NqE3rYKj

 例子:
    |   element          |   title      |
    |   选择上传组件     |   选择待上传文件   |
    |   已选待上传文件     |   [1.png,2.mp3,4.mp4]      |

@clgwlg
Copy link
Contributor

clgwlg commented May 26, 2022

参考API,需要提供上传文件的路径和文件名

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants