一、保存图像 (Save Image)的介绍
可以将图像保存到磁盘的一种活动
二、保存图像 (Save Image)在UiPath中的使用
1. 打开设计器,在设计库中新建一个Sequence,为序列命名及设置Sequence存放的路径,然后在Activities中搜索open browser,并将其拖至设计区,且设置打开网站,运行该流程“https://www.baidu.com/”
![](https://upload-images.jianshu.io/upload_images/14843435-7cb36ebe2125049b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/14843435-846b69b9c9dc0bd1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. 在Activities中搜索设置文本(set text),并将其拖至设计区,设置输入text为“uipath”,继续在Activities中搜索click,设置点击元素为“百度一下”,运行该流程
3. 在Activities中搜索 截取图片(Take Screenshot),并将其拖至设计区,在属性区域设置输出变量为image
#截图区域
![](https://upload-images.jianshu.io/upload_images/14843435-4498489c0cf60768.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/14843435-575de2ec14444176.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#设置变量
![](https://upload-images.jianshu.io/upload_images/14843435-c1d3e83c440f8799.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/14843435-63d931a74944f8ad.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4. 在Activities中搜索 保存图像 (Save Image),并将其拖至设计区,在属性区域设置输入变量为image,保存路径设置为“001.png”(当设置相对路径时,为当前的工作目录)
#设置保存文件路径
![](https://upload-images.jianshu.io/upload_images/14843435-c0d80c9a1613a12b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/14843435-25d644c4bc60dbc8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#运行完成,你会看到工作目录保存了流程所截取的图像
总结:以上流程就用到了保存图片(save image)的操作
UiPath交流群:465630324