testExplorer.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:pupy 作者: ru-faraon 项目源码 文件源码
def TestAll():
    try:
        try:
            iexplore = win32com.client.dynamic.Dispatch("InternetExplorer.Application")
            TestExplorer(iexplore)

            win32api.Sleep(1000)
            iexplore = None

            # Test IE events.
            TestExplorerEvents()
            # Give IE a chance to shutdown, else it can get upset on fast machines.
            time.sleep(2)

            # Note that the TextExplorerEvents will force makepy - hence
            # this gencache is really no longer needed.

            from win32com.client import gencache
            gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
            iexplore = win32com.client.Dispatch("InternetExplorer.Application")
            TestExplorer(iexplore)
        except pythoncom.com_error, exc:
            if exc.hresult!=winerror.RPC_E_DISCONNECTED: # user closed the app!
                raise
    finally:
        iexplore = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号