Getting return values out of the WebBrowser

Hey I've been playing a bit around with the web browser component in Vision and I was wondering if there is a way to get a return value or access to the logs from within the jython script.
So something like (except this is not working since the function always returns None):

browser = event.source.parent.getComponent('Web Browser')
result = browser.executeJavaScript('3+5')
print result #None but I want 8

Sadly my knowledge in Web Dev is limited so I was hoping some of you could help me with this.

I'm pretty sure browser.browser (assuming browser is a reference to the outer Vision component as in your sample code) will give you a reference to the inner JxBrowser object. What you can do with that is going to depend on your version of the web browser module, and your reference is going to be the Javadocs for JxBrowser.

1 Like

executeJavaScript will always return none;

1 Like