SikuliLibrary 库关键字注释
在 https://github.com/rainmanwy/robotframework-SikuliLibrary 看到rainmanwy 整理的SikuliLibrary库,非常适合工作需要,将原关键字整理成了中文,也是对这些资料的学习。
Keyword |
Arguments |
Documentation |
翻译 |
功能 |
||||||||||
path |
Add image path |
添加图片路径 |
配置调用图片存储的位置 |
|||||||||||
Capture whole screen |
捕捉整个屏幕 |
全屏截屏 |
||||||||||||
Clear all highlights from screen |
清除屏幕上所有亮点 |
|
||||||||||||
image |
Clear highlight from screen |
清除屏幕上亮点 |
清除指定图片上的亮点 |
|||||||||||
image |
Click image |
点击图片 |
单击参数中的图片 |
|||||||||||
areaImage, targetImage |
Click in. Click target image in area image. |
点击目标图片中的目标区域 |
|
|||||||||||
image |
Double click image |
双击图片 |
|
|||||||||||
areaImage, targetImage |
Double click in. Double click target image in area image. |
双击目标图片的目标区域 |
|
|||||||||||
srcImage, targetImage |
Drag the source image to target image. If source image is empty, drag the last match and drop at given target |
拖动源图片到目标图片,如果原图片为空,拖动到上一次图片到图标图片 |
|
|||||||||||
image |
Tries to find the image on the screen, returns accuracy score (0-1) Example Usage:
|
找出屏幕上的图片,返回(0-1)的准确的值 |
返回相似值;找出屏幕上的图片和参数中图片近似度值,如果值大于0.95,执行关键字keyword1;否则执行keyword2. |
|||||||||||
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:
|
如果参数没有图片信息,则获得整个屏幕的文字;如果有图片信息,则获取范围内的文字信息。调用关键字前,需要将setOcrTextRead置为1. |
从屏幕或者图片上获取文字信息 |
|||||||||||
image |
Highlight matched image |
高亮匹配的图片 |
将和参数中匹配的图片高亮显示 |
|||||||||||
image, text |
Input text. Image could be empty |
输入文字,图片可以为空 |
在图片中输入文字 |
|||||||||||
*mouseButtons |
Press and hold the specified buttons @mouseButtons: Could be LEFT, MIDDLE, RIGHT Example Usage:
|
按下并保持指定按键 @mouseButtons 可以是左键,中间键,右键。 |
|
|||||||||||
image |
Move the mouse pointer to the target @image: if image is empty, will move mouse to the last matched. Example Usage:
|
鼠标移动到指定目标 @image 如果图片为空,则移动鼠标到上一次匹配图片。 |
|
|||||||||||
*mouseButtons |
release the specified mouse buttons @mouseButtons: Could be LEFT, MIDDLE, RIGHT. If empty, all currently held buttons are released Example Usage:
|
释放指定的鼠标按键 参数可以是左键,中间键,右键。如果为空,则释放所有保持的按键。 |
|
|||||||||||
image, text |
Paste text. Image could be empty |
粘贴文字。图片可以为空 |
粘贴文字到指定图片 |
|||||||||||
keyConstant |
Presses a special keyboard key. For a list of possible Keys view docs for org.sikuli.script.Key . Example Usage:
|
按下一个特殊的按键 |
在当前画面位置发送一个特殊键,特殊键列表参见 官网。 |
|||||||||||
image |
Right click image |
右键点击图片 |
|
|||||||||||
areaImage, targetImage |
Right click in. Right click target image in area image. |
右键点击图片的目标区域 |
|
|||||||||||
image |
Screen should contain image |
截屏包括指定图片 |
|
|||||||||||
image |
Screen should not contain image |
截屏不包括指定图片 |
|
|||||||||||
path |
Set folder for captured images |
设置文件夹为截图保存文件夹 |
|
|||||||||||
minSimilarity |
Set Sikuli minSimilarity(0-1) |
设置sikuli 最低的相似度, |
默认为0.7,相似度越高,识别的精确度越高 |
|||||||||||
ocrTextRead |
Set Sikuli OCR text read(true/false) |
设置OCR text read 为真或假 |
|
|||||||||||
timeout |
Set Sikuli timeout(seconds) |
设置超时时间 |
|
|||||||||||
Stops the remote server. The server may be configured so that users cannot stop it. |
停止远程服务 |
|
||||||||||||
image, timeout |
Wait until image shown in screen |
等待屏幕上出现 指定图片 |
|
|||||||||||
image, timeout |
Wait until image not in screen |
等待屏幕上图片消失 |
|
|||||||||||
steps, image= |
Move mouse to the target, and wheel down with give steps Example Usage:
|
移动鼠标到目标图片,并向下移动给定步数滚轮 |
|
|||||||||||
steps, image= |
Move mouse to the target, and wheel up with give steps Example Usage:
|
移动鼠标到目标图片,并向上移动给定步数滚轮 |
|
Altogether 31 keywords.