I'm trying to use the new wx.html2.WebView that has been implemented
in the wxPython 2.9.3.1. However I'm running into an issue on OSX.
I'm trying to access the cookies on a page via the RunScript API and
keep getting None.
cookie = self.wv.RunScript("document.cookie")
where self.wv is a WebView object from wx.html2. Any suggestions as
to why this always returns None? Am I just using RunScript
incorrectly? Any help would be appreciated.
On Jan 11, 5:09 pm, Rish <rishsha...@gmail.com> wrote:
Hi all,
I'm trying to use the new wx.html2.WebView that has been implemented
in the wxPython 2.9.3.1. However I'm running into an issue on OSX.
I'm trying to access the cookies on a page via the RunScript API and
keep getting None.
cookie = self.wv.RunScript("document.cookie")
where self.wv is a WebView object from wx.html2. Any suggestions as
to why this always returns None? Am I just using RunScript
incorrectly? Any help would be appreciated.
document.cookie is not really a string, but an object that can behave like a string. Have you tried RunScript("document.cookie.toString()")?
Regards,
Kevin
···
On Jan 11, 2012, at 6:09 PM, Rish wrote:
On Jan 11, 5:09 pm, Rish <rishsha...@gmail.com> wrote:
Hi all,
I'm trying to use the new wx.html2.WebView that has been implemented
in the wxPython 2.9.3.1. However I'm running into an issue on OSX.
I'm trying to access the cookies on a page via the RunScript API and
keep getting None.
cookie = self.wv.RunScript("document.cookie")
where self.wv is a WebView object from wx.html2. Any suggestions as
to why this always returns None? Am I just using RunScript
incorrectly? Any help would be appreciated.
That does not work for me either (at least on OSX).
It seems I found another bug regarding this class on OSX. This class
(wx.html2.WebView) cannot be used as a child of wx.Dialog since it
seems the call ShowModal of the dialog interferes with the event loop
WebView uses (such that LoadURL never will actually load a URL). I
got around this by using Show() instead and having to set an event on
a thread other than the Main thread such that the Main thread only did
UI work and the rest of code continued execution off the Main thread
after the event was set on a call to Close of the dialog. Not very
intuitive or easy to get around.
Overall the attempt at making this work cross platform is nice, but I
wouldn't expect most programmers to jump through these hoops and use
it (I have to admit I was very excited to try it).
-Rishi
···
On Jan 11, 8:11 pm, Kevin Ollivier <kevin-li...@theolliviers.com> wrote:
Hi Rish,
On Jan 11, 2012, at 6:09 PM, Rish wrote:
> For anyone interested, here is a hacky way of doing it that I figured
> out
> Is there a better way of retrieving the cookies?
document.cookie is not really a string, but an object that can behave like a string. Have you tried RunScript("document.cookie.toString()")?
Regards,
Kevin
> On Jan 11, 5:09 pm, Rish <rishsha...@gmail.com> wrote:
>> Hi all,
>> I'm trying to use the new wx.html2.WebView that has been implemented
>> in the wxPython 2.9.3.1. However I'm running into an issue on OSX.
>> I'm trying to access the cookies on a page via the RunScript API and
>> keep getting None.
>> cookie = self.wv.RunScript("document.cookie")
>> where self.wv is a WebView object from wx.html2. Any suggestions as
>> to why this always returns None? Am I just using RunScript
>> incorrectly? Any help would be appreciated.
>> Thanks!
> --
> To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
> or visithttp://groups.google.com/group/wxPython-users?hl=en