Using text search in Web page with Sikuli

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

时间: 2024-12-29 23:18:41

Using text search in Web page with Sikuli的相关文章

How to save content/text of a web page by forcing save-as option

I would like to know what would be the best way to save contents from a web page. I mean to force save-as option by clicking a link or button. I often found that javascript would not be an option because it's only working for IE, so I thought that it

Lesson 2 Building your first web page: Part 3

Time to build your first HTML page by hand I could go on with more theory and send half of you to sleep (trust me); instead you are now going to actually build your very first web page! One of the best ways to learn something is to actually do it, so

解读Web Page Diagnostics网页细分图

http://blog.sina.com.cn/s/blog_62b8fc330100red5.html Web Page Diagnostics (以下简称WPD),这是LR Analysis中非常重要的一块,搞清楚这部分的内容会让你少走很多弯路,很多环境问题都可以通过它来定位,比如客户端,网络.通过它可以你可以比较好的来定位是环境的问题还是应用本身的问题,当然更重要的是Web页面本身的问题. Web Page Diagnostics:页面诊断图,也叫页面分解总图 “页面分解”显示某一具体事务

Lesson 2 Building your first web page: Part 2

Tag Diagram You may have noticed that HTML tags come in pairs; HTML has both an opening tag (<tag name>) and a closing tag (</tag name>). The only difference between the opening and closing tags is that the closing tag contains an extra forwar

Lesson 2 Building your first web page: Part 1

In this ‘hands-on’ module we will be building our first web page in no time. We just need to quickly cover a couple of points beforehand to help get our feet on the ground. The three ways you can build a web page 1. Use a pre-made template: WHAT IS A

how to auto refresh your web page in browser?

There 's many way to do this but most simple one is just use live.js. You just need include live.js into you web page. to be aware! you need load you page in web server enviroment and it needs to be front of every js you'd have in your web pages. fee

[Project] Simulate HTTP Post Request to obtain data from Web Page by using Python Scrapy Framework

1. Background Though it's always difficult to give child a perfect name, parent never give up trying. One of my friends met a problem now. his baby girl just came to the world, he want to make a perfect name for her. he found a web page, in which he

Web Page Diagnostics网页细分图解读

Web Page Diagnostics (以下简称WPD),这是LR Analysis中非常重要的一块,搞清楚这部分的内容会让你少走很多弯路,很多环境问题都可以通过它来定位,比如客户端,网络.通过它可以你可以比较好的来定位是环境的问题还是应用本身的问题,当然更重要的是Web页面本身的问题. Web Page Diagnostics:页面诊断图,也叫页面分解总图 “页面分解”显示某一具体事务在测试过程的响应情况,进而分析相关的事务运行是否正常. 此视图下面的文件结构大体上与scripts中act

How a web page loads

The major web browsers load web pages in basically the same way. This process is known as parsing and is described by the HTML5 specification. A high-level understanding of this process is critical to writing web pages that load efficiently. Parsing