UIPath官方教程Level 1-控制流语句实例(IF/Else、Do While/For Each循环、高级控制流、数学问题打印到记事本、求和及串联)

一、学习进度:
官方教程网址:https://academy.uipath.com
学习进度:(14课)
在这里插入图片描述
学习内容:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
二、实例练习
1.控制流—If/Else语句
1)Flowchart方式实现:
在这里插入图片描述
2)Sequence-If/Else语句实现:
在这里插入图片描述
2.控制流—循环
在这里插入图片描述
1)基于FlowDecision的循环,直到找到闰年
2)Sequence的循环:
–While与Do While的区别:While是满足条件再执行;Do While是直接执行,直到满足条件。 以Do While实现:
在这里插入图片描述
–For each实现:
<1>Select Folder:
在这里插入图片描述
<2>Assign,将获取到的值存到数组中:
在这里插入图片描述
<3>for each进行遍历数组中的item及索引index。注意item及index要tostring。
在这里插入图片描述
<4>Run执行:选择kaoshi文件夹
在这里插入图片描述
查看输出结果:
在这里插入图片描述
3.控制流-高级
示例:随机出-1000之间的数子,用户猜测:猜对直接停止程序;猜错,则根据用户猜测的数据进行更高或更低的说明,重复整个过程。
1)随机获得0-1000的数字:
在这里插入图片描述
2)请输入自己猜测数字:
在这里插入图片描述
3)进行random=guess的验证,若不等于,则进一步进行random<guess的验证,然后进行循环:
在这里插入图片描述
执行结果:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
4.第2课练习1简单流程决策-问数学问题
1)先问数学问题,设置button按钮为yes/no,设置输出变量为answer:
在这里插入图片描述
2)如果Yes,分配“正确的”;如果No,分配“错误的”:
在这里插入图片描述
3)再建一个sequence。并在其内部加上open application 和attach windows控件
–添加Sequence:
在这里插入图片描述
– open Application
找到“ open Application”活动并将其拖到Sequence中。现在我们必须指出要打开的应用程序。最简单的方法是在桌面上打开记事本,单击 “ open Application”活动中的“ 在屏幕上指示窗口Indicate window on screen”按钮,然后单击“记事本”窗口。
在这里插入图片描述
在这里插入图片描述
– attach window
在这里插入图片描述
4)找到一个Type Into活动并将其拖到Attach Window活动的Do容器中,键入活动的输入文本是resultText变量
在这里插入图片描述
5.在Sequence末尾添加“ close Application”活动以退出记事本

在这里插入图片描述

运行工作流程,应该看到“记事本”被打开,然后在 在关闭过程中弹出窗口出现时,单击“不保存 ”。
执行结果:
–选择Yes:
在这里插入图片描述
在这里插入图片描述
–选择No:
在这里插入图片描述
在这里插入图片描述
5.第2课练习2:在序列中创建四个GenericValue类型的变量,将其各种操作打印出来,看结果如何?
1)定义变量:
在这里插入图片描述
2)各种操作:
在这里插入图片描述
执行结果:
在这里插入图片描述
总结:
UiPath Studio有3个主要区域:活动面板、工作流设计器和属性面板。
有两种方法可以组织操作:简单的Sequence工作流,以及用于更复杂工作流和高级组织的Flowchart。
变量的主要类型有:整数、字符串、日期时间、布尔值、泛型、数组…
Generic变量可以保存任何类型的数据。
任何变量都有定义其生存期的作用域(scope)。

根据文档,保证可以在45题中答对百分之七十。实验通过人数过百。 一下为其中部分题目: 1. Which activity can you use if you want to loop through a collection of items? 2. What type of content can you store inside a Generic type variable? 3. What is TimeoutMS property used for? 4. What activity can you use to get a column value from a specific row of a DataTable? 5. How can we make sure that an app is in a certain state in a Citrix environment? 6. What happens if you send “123[k(enter)]” by using Type Into activity with the SimulateType property selected? 7. Which activities can be used to interact with the user? 8. How can UiPath identify an UI element on the screen? 9. How can you install and update activity packs? 10. What recording wizard would you use to generate partial selectors? 11. What is UiExplorer used for? 12. How can a string variable called myString be converted to an all-capitals representation for future use? 13. When should you use the Flowchart workflow? 14. How can you trigger another workflow from within your current one? 15. As a best practice, how should workflows use a local desktop application? 16. The Read PDF with OCR activity will throw an error if the following is not specified: 17. Is it possible to make an image automation if you are not in a Citrix environment? 18. When is it recommended to use containers? 19. What happens if the AddHeaders option is checked in the Read Range Activity? 20. How should you organize your workflow? 21. What activities can be used to interact with applications in a Citrix environment? 22. How does UiPath recognize elements on screen? 23. Which of the following text scraping methods preserve the text position? 24. By using the Full Text scraping method, the robot is able to: 25. What is a wildcard used for? 26. What are the supported wildcard characters for selectors in UiPath Studio? 27. What kind of workflow should you create to define business rules? 28. What is an argument? 29. Given two Generic variables, A with valu
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值