首页 > Web开发 > 详细

Using text search in Web page with Sikuli

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

在網頁中如何使用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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!