How can I do this with Firefox or Google Chrome?
ie = win32com.client.Dispatch('InternetExplorer.Application')
ie.visible = 1
ie.navigate('http://google.com')
Is there a way to do it?
ps: I need to use the ReadyState with it... for example while (ie.ReadyState != 4):
, or in other words, I need some command that wait unt开发者_开发技巧il the page loads completely until do the next command, that's why I need the dispatch, that currently work very good with IE
Firefox does not expose a COM object; this is not possible. (AFAIK)
You can use the webbrowser
module to open a URL in the user's default browser.
Have a look at the webbrowser
module in the Python standard library.
精彩评论