In article <[EMAIL PROTECTED]>, Martin Tönnishoff <[EMAIL PROTECTED]> wrote: > Can you please help me to get this right? How do I convert a string to the > required "unicode_text" type wich is noth > the python builtin one.
The error message is misleading you. The problem is not the string; it's that you are not targeting the correct reference. [...] > safari.document.URL.set("http://www.google.de") > > #wait for browser to open page > foo = 5 + int(random.random()*10) > time.sleep(foo) > > #do some javascript manipulation on the loaded page > jscript= u"window.alert('foo');" > > safari.do_JavaScript(jscript) You need a reference to the specific document not to the application: safari.document.do_JavaScript(jscript) -- Ned Deily, [EMAIL PROTECTED]
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig