On 6/14/07, Richard Bell <[EMAIL PROTECTED]> wrote:
I'm trying to debug code for a class to automate IE and am having
difficulty
with ShowBrowserBar. I've looked on the Web and found a couple of
examples
that suggest this should work:
--- begin code ---
def spin(t):
t0 = time.clock()
while time.clock()-t0 < t: pass
time.clock()
ie=win32com.client.Dispatch('internetexplorer.application')
ie.Visible=1
ie.Navigate('www.google.com')
spin(3)
CLSID_SEARCH = "{30D02401-6A81-11D0-8274-00C04FD5AE38}"
CLSID_FAVORITES = "{EFA24E61-B078-11D0-89E4-00C04FC9E26E}"
CLSID_HISTORY = "{EFA24E62-B078-11D0-89E4-00C04FC9E26E}"
CLSID_CHANNELS = "{EFA24E63-B078-11D0-89E4-00C04FC9E26E}"
CLSID_FOLDERS = "{EFA24E64-B078-11d0-89E4-00C04FC9E26E}"
CLSID_xxx = '{32683183-48a0-441b-a342-7c2a440a9478}'
CLSID_02 = '{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}'
bar = CLSID_02
print 'true', bar
ie.ShowBrowserBar(bar,True,0)
spin(3)
print 'false', bar
ie.ShowBrowserBar(bar,False,0)
spin(3)
--- end code ---
On my machine with IE7 it does not. Testing with my class yields a COM
error:
test0039_Y_ShowBrowserBar (__main__.TestYamie1) ... Yamie COM error
Y_ShowBrowserBar error
Failed with code -2147352567: Exception occurred.
Argument 3
The source of the error is None
The error message is None
More info can be found in None (id=0)
Where the underlying code looks like this:
self.ShowBrowserBar(vClsID, bShow, vSize)
The problem occurs independent of the browser bar class ID.
Does anyone have any insight/experience/suggestions/advice?
Thanks.
Richard
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32
When I run this, (winxp pro, python2.5.1, pywin32 build 210) I get no
errors. IE pops up and loads the URL. I do not however see any change in the
browsers state, between the 2 calls of ie.ShowBrowserBar(bar,x,0), with x
(True, False)
Possible an issue with your configuration or installation?
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32