码迷,mamicode.com
首页 > Web开发 > 详细

Using text search in Web page with Sikuli

时间:2014-10-21 00:43:33      阅读:328      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   ar   使用   for   sp   

在網頁中如何使用Sikuli找特定字串呢?

原理:

我們可以使用 組合鍵 ctrl + 來放大網頁的比例,使得sikuli的OCR功能找的更清準

 

實作:

for i in range(4):
    type("+", KEY_CTRL)

which = input()  # Let user type the string which user want.

print Region(344,178,124,501).hover(which)

mouseMove(Env.getMouseLocation().offset(-100,-100))

print Region(344,178,124,501).text()

 We can use ‘Create Region‘ icon in sikuli IDE to get Region(344,178,124,501).

   Or Using selectRegion() in the runtime gets the Region(344,178,124,501).

 

相關資料:http://safx-dev.blogspot.tw/2013/04/sikulitips.html

Using text search in Web page with Sikuli

标签:style   blog   http   color   io   ar   使用   for   sp   

原文地址:http://www.cnblogs.com/bittorrent/p/4039137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!