UiPath图片操作截图的介绍和使用
Posted the-day-of-the-wind
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UiPath图片操作截图的介绍和使用相关的知识,希望对你有一定的参考价值。
一、截图(Take Screenshot)的介绍
截取指定的UI元素屏幕截图的一种活动,输出量仅支持图像变量(image)
二、Take Screenshot在UiPath中的使用
1. 打开设计器,在设计库中新建一个Sequence,为序列命名及设置Sequence存放的路径,然后在Activities中搜索open browser,并将其拖至设计区,且设置打开网站,运行该流程“https://www.baidu.com/”
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-65425a4575e06f5c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-e55fe1bcba1b86d1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. 在Activities中搜索设置文本(set text),并将其拖至设计区,设置输入text为“uipath”,继续在Activities中搜索click,设置点击元素为“百度一下”,运行该流程
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-403c92e47d28c7d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. 在Activities中搜索 截取图片(Take Screenshot),并将其拖至设计区,在属性区域设置输出变量为image
#截图区域
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-83da8e32130d923d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-f536fddbb47011bb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#设置变量
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-3b724fb603099a9b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-0efc7d151200c0de.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4. 在Activities中搜索 微软OCR (Microsoft OCR),并将其拖至设计区,在属性区域设置输入变量为image,输出text值设置为result,继续在Activities中搜索 log message,并将其拖至设计区,输入变量result,运行流程
#设置输出变量
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-26eb00b13df6a885.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-5f2fbbb6dd20c3a2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![技术图片](https://upload-images.jianshu.io/upload_images/14843435-09556c211b80167b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#运行完成,你会看到日志窗口打印了截图文件通过OCR识别后打印的文本值
总结:以上流程就用到了截取图片(Take Screenshot)的操作
UiPath交流群:465630324
以上是关于UiPath图片操作截图的介绍和使用的主要内容,如果未能解决你的问题,请参考以下文章