I tried using com to achieve my goal i.e to manipulate various ui components on a web page.
I dont know why, but this seemingly correct code gives following error :
-------------------------------------------------- Code---------------------------------------------------------
<b>
- import win32com.client
-
-
ie = win32com.client.Dispatch("InternetExplorer.Application")
-
ie.Visible = 1
-
ie.navigate("http://google.com")
-
-
page = ie.Document
-
links=page.links
-
links[0].click()
</b>
----------------------------------------------------Error--------------------------------------------------------
Traceback (most recent call last):
File "C:\Eclipse\eclipse\workspace\p\src\pkg\try_with_c om.py", line 7, in ?
page = ie.Document
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 491, in __getattr__
raise pythoncom.com_error, details
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147467259), None)
---------------------------------------------------END----------------------------------------------------------
I am able to topen the browser but nothin happens after that. Could you please guide me where ami going wrong?