I'm using gtkmozembed to automatically generate screenshots for a number of sites. I simply open up a browser window and loop through a few thousand urls, taking a screenshot of each page.

Some sites however make modal dialogs appear (javascript alerts, password prompts, security warnings, etc) Unfortunately I can't ignore these and simply continue to the next url, the dialog has to be closed first. This must be done programmatically since it's supposed to be an automatic tool. I can't even destroy() the main window until the dialog disappears so the screenshot loop just freezes...

I suppose there's a way to find these dialogs that pop up and close them programmatically, but I'm completely new to pygtk (and python) so I'm a little lost. Help?


widget = gtkmozembed.MozEmbed()
parent = gtk.Window()
parent.add(widget)
parent.show_all()

# I guess I need this
parent.find_the_modal_dialog_that_is_blocking_me().destroy()
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to