Get IHTMLDocument2 for UI Automation in Python

Get IHTMLDocument2 interface

Also see:http://support.microsoft.com/kb/249232

Here is my python implentment:

Multithreading

IHTMLDocument2 is thread safe, we can not use it in any other thread except the main thread by default. If you want to use it in multi threads, write these code at the top of your file, and remenber do not explicit call pythoncom.CoInitializeEx(0) and pythoncom.CoUninitialize() :

Also see:http://bytes.com/topic/python/answers/26897-multithreaded-com-server-problem

 

IHTMLDocument2 for UI Automation

Also see : http://msdn.microsoft.com/en-us/library/aa752574%28VS.85%29.aspx

Now, you can write your own UI Automation framework by IHTMLDocument2.

[温馨提示]:该文章由原博客园导入而来,如排版效果不佳,请移步:http://www.cnblogs.com/coderzh/archive/2010/05/05/Get-IHTMLDocument2-UIAutomation-Python.html

微信扫一扫交流

作者:CoderZh
微信关注:hacker-thinking (程序员思考者)
本文出处:https://blog.coderzh.com/2010/05/05/Get-IHTMLDocument2-UIAutomation-Python/
文章版权归本人所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。