You can use the following function to run JavaScript Code and then return the desired value in the JavaScript code.
help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html#evaluate(java.lang.String)
Object value = browser.evaluate("return document.getElementById('YOUR_CONTROLS_ID').value");
You are able to access everything via JavaScript and DOM.
You can also execute JavaScript methods/functions like
Object value = browser.evaluate("getACertainValue()");
As you can see in the JavaDoc of the evaluate method, the following types of objects can be mapped from JavaScript to an Java object:
javascript null or undefined -> null
javascript number -> java.lang.Double
javascript string -> java.lang.String
javascript boolean -> java.lang.Boolean
javascript array whose elements are all of supported types -> java.lang.Object[]
Best regards,
Simon
[Updated on: Mon, 23 April 2012 08:08] by Moderator