在  https://github.com/rainmanwy/robotframework-SikuliLibrary 看到rainmanwy 整理的SikuliLibrary库,非常适合工作需要,将原关键字整理成了中文,也是对这些资料的学习。

Keyword

Arguments

Documentation

翻译

功能

Add Image Path

path

Add image path

添加图片路径

配置调用图片存储的位置

Capture Screen

 

Capture whole screen

捕捉整个屏幕

全屏截屏

Clear All Highlights

 

Clear all highlights from screen

清除屏幕上所有亮点

Clear Highlight

image

Clear highlight from screen

清除屏幕上亮点

清除指定图片上的亮点

Click

image

Click image

点击图片

单击参数中的图片

Click In

areaImage, targetImage

Click in. Click target image in area image.

点击目标图片中的目标区域

Double Click

image

Double click image

双击图片

Double Click In

areaImage, targetImage

Double click in. Double click target image in area image.

双击目标图片的目标区域

Drag And Drop

srcImage, targetImage

Drag the source image to target image. If source image is empty, drag the last match and drop at given target

拖动源图片到目标图片,如果原图片为空,拖动到上一次图片到图标图片

Get Match Score

image

Tries to find the image on the screen, returns accuracy score (0-1) Example Usage:

${score} =

Get Match Score

somethingThatMayExist.png

   

Run Keyword if

${score} > 0.95

keyword1

ELSE

keyword2

找出屏幕上的图片,返回(0-1)的准确的值

返回相似值;找出屏幕上的图片和参数中图片近似度值,如果值大于0.95,执行关键字keyword1;否则执行keyword2.

Get Text

image=

If image is not given, keyword will get text from whole Screen; If image is given, keyword will get text from matched region ,Call keyword setOcrTextRead to set OcrTextRead as true, before using text recognition keywords

Example Usage:

Set Ocr Text Read

true

Get Text

 

Get Text

test.png

如果参数没有图片信息,则获得整个屏幕的文字;如果有图片信息,则获取范围内的文字信息。调用关键字前,需要将setOcrTextRead置为1.

从屏幕或者图片上获取文字信息

Highlight

image

Highlight matched image

高亮匹配的图片

将和参数中匹配的图片高亮显示

Input Text

image, text

Input text. Image could be empty

输入文字,图片可以为空

在图片中输入文字

Mouse Down

*mouseButtons

Press and hold the specified buttons

@mouseButtons: Could be LEFT, MIDDLE, RIGHT

Example Usage:

Mouse Move

test.png

 

Mouse Down

LEFT

RIGHT

Mouse Up

   

按下并保持指定按键

@mouseButtons 可以是左键,中间键,右键。

Mouse Move

image

Move the mouse pointer to the target

@image: if image is empty, will move mouse to the last matched.

Example Usage:

Mouse Move

test.png

Screen Should Contain

test.png

Mouse Move

 

鼠标移动到指定目标

@image 如果图片为空,则移动鼠标到上一次匹配图片。

Mouse Up

*mouseButtons

release the specified mouse buttons

@mouseButtons: Could be LEFT, MIDDLE, RIGHT. If empty, all currently held buttons are released

Example Usage:

Mouse Move

test.png

 

Mouse Down

LEFT

RIGHT

Mouse Up

LEFT

RIGHT

释放指定的鼠标按键

参数可以是左键,中间键,右键。如果为空,则释放所有保持的按键。

Paste Text

image, text

Paste text. Image could be empty

粘贴文字。图片可以为空

粘贴文字到指定图片

Press Special Key

keyConstant

Presses a special keyboard key.

For a list of possible Keys view docs for org.sikuli.script.Key .

Example Usage:

Double Click

textFieldWithDefaultText.png

Press Special Key

DELETE

按下一个特殊的按键

在当前画面位置发送一个特殊键,特殊键列表参见 官网。

Right Click

image

Right click image

右键点击图片

Right Click In

areaImage, targetImage

Right click in. Right click target image in area image.

右键点击图片的目标区域

Screen Should Contain

image

Screen should contain image

截屏包括指定图片

Screen Should Not Contain

image

Screen should not contain image

截屏不包括指定图片

Set Capture Folder

path

Set folder for captured images

设置文件夹为截图保存文件夹

Set Min Similarity

minSimilarity

Set Sikuli minSimilarity(0-1)

设置sikuli 最低的相似度,

默认为0.7,相似度越高,识别的精确度越高

Set Ocr Text Read

ocrTextRead

Set Sikuli OCR text read(true/false)

设置OCR text read 为真或假

Set Timeout

timeout

Set Sikuli timeout(seconds)

设置超时时间

Stop Remote Server

 

Stops the remote server.

The server may be configured so that users cannot stop it.

停止远程服务

Wait Until Screen Contain

image, timeout

Wait until image shown in screen

等待屏幕上出现 指定图片

Wait Until Screen Not Contain

image, timeout

Wait until image not in screen

等待屏幕上图片消失

Wheel Down

steps, image=

Move mouse to the target, and wheel down with give steps

Example Usage:

Wheel Down

5

 

Wheel Down

5

test.png

移动鼠标到目标图片,并向下移动给定步数滚轮

Wheel Up

steps, image=

Move mouse to the target, and wheel up with give steps

Example Usage:

Wheel Up

5

 

Wheel Up

5

test.png

移动鼠标到目标图片,并向上移动给定步数滚轮

Altogether 31 keywords.

SikuliLibrary 库关键字注释的更多相关文章

  1. Robot Framework(AutoItLibrary库关键字介绍)

    AutoItLibrary库关键字 AutoItLibrary 的对象操作大体上有几大主要部分,Window 操作.Control 操作.Mouse 操作.Process操作.Run 操作.Reg 操 ...

  2. [java学习笔记]java语言基础概述之标识符&关键字&注释&常量和变量

    一.标识符 在程序中自定义的一些名称 由26个英文字母的大小写,数字,_$组成 定义合法标识符的规则: 不能以数字开头 不能使用关键字 java严格区分大小写 注意:在起名字时,为了提高阅读性,必须得 ...

  3. Robotframework SSHLibrary库关键字

    1.连接远程机器 两种方法,一种用户名密码登录连接,一种是通过密钥连接 (1)用户名密码连接 (2)密钥连接 大概介绍下密钥:首先由用户生成一对密码,公钥与私钥:私钥是给需要连接的用户,连接时使用私钥 ...

  4. [Robot Framework] SikuliLibrary的关键字执行依赖java进程,但是上次的java进程如果没有杀掉,robot framework控制台的日志出不来,怎么办?

    如果在suite的setup里面杀掉java进程:AutoItLibrary.Run | taskkill /F /IM java.exe 执行sikuli的关键字会报这样的错误: Connectio ...

  5. SSHLibrary库关键字汇总

    红色框的部分是设置系统用户标识符(不可缺少):$表示非超级用户  #表示超级用户

  6. sed根据关键字注释crontab的计划任务

    [root@linux06 ~]# crontab -e*/5 * * * * /root/time_test.sh ----------------------------------------- ...

  7. C#关键字的个人理解与注释

    C#关键字注释:abstract:抽象as:类型转换(返回转换结果)base:基类bool:布尔类型break:条件中断语句byte:字节case:条件语句catch:异常捕获后执行char:16 位 ...

  8. Day003 注释、标识符和关键字

    注释.标志符.关键字 注释 当项目逐渐复杂,注释就很重要了. 注释不会被执行,是给我们写代码的人看的. 书写注释是一个非常好的习惯. Java中的注释有三种: 当行注释 // 多行注释 /* 注释 * ...

  9. java标识符,关键字,注释及生成Doc文档

    # java语法基础 ## 标识符,关键字与注释 ### 标识符 1.类名,变量名,方法名都称为标识符. 2.命名规则:(1):所有的标识符都应该以字母(AZ,或者az)美元符($)或者下划线(_)开 ...

随机推荐

  1. Oracle 中新增字段后patch

    begin  ad_zd_table.patch('APPLSYS', 'CUX_3_GL_FARMER_BALANCE'); end ;

  2. 一些bug总结

    1:IE浏览器低版本的parseInt问题; 开发中遇到把月份转为小数时出现bug 例子:parseInt('08')-1; 本来应该得7,但是最后的结果却是-1,月份得-1,根据得到的月份获取的日历 ...

  3. Spark Streaming消费Kafka Direct方式数据零丢失实现

    使用场景 Spark Streaming实时消费kafka数据的时候,程序停止或者Kafka节点挂掉会导致数据丢失,Spark Streaming也没有设置CheckPoint(据说比较鸡肋,虽然可以 ...

  4. MongoDB是一个介于关系数据库和非关系数据库之间的产品

    MongoDB是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的.他支持的数据结构非常松散,是类似json的bjson格式,因此可以存储比较复杂的数据类型.M ...

  5. python学习(解析python官网会议安排)

    在学习python的过程中,做练习,解析https://www.python.org/events/python-events/ HTML文件,输出Python官网发布的会议时间.名称和地点. 对ht ...

  6. 性能测试常用Oracle语句

    性能测试常用Oracle语句 显示数据库当前的连接数 select count(*) from v$process; 显示数据库最大连接数: select value from v$parameter ...

  7. KVM虚拟化技术(七)虚拟机配置文件

    KVM虚拟机的配置文件在/etc/libvirt/qemu/下,为xml文件 整体结构如下: <domain type='kvm'> 虚拟机整体信息 系统信息 硬件资源特性 突发事件处理 ...

  8. Canvas画图在360浏览器中跑偏的问题

    问题描述,canvas画图的js代码中编写的是画正方形的代码,结果在360浏览器上变成了长方形,不知道怎么回事,请问各位大神是否遇到过此类问题? <!DOCTYPE html> <h ...

  9. django框架的models

    在django的框架设计中采用了mtv模型,即Model,template,viewer Model相对于传统的三层或者mvc框架来说就相当对数据处理层,它主要负责与数据的交互,在使用django框架 ...

  10. 利用qmake生成Makefile文件

    在linux下写程序,免不了要写Makefile文件,用automake,总感觉比较麻烦,linux人喜欢做麻烦的事,以显得风格迥异. 其实用qmake生成Makefile文件相当简单. 1 装好qm ...