How can I open a webpage and run a javascript function from a Java app

Posted by Deelo55 on Stack Overflow See other posts from Stack Overflow or by Deelo55
Published on 2009-10-24T06:59:46Z Indexed on 2010/05/11 6:04 UTC
Read the original article Hit count: 255

Filed under:
|
|

Hi, I would like to open a webpage and run a javascript function from within a java app. For example I would like to open the page www.mytestpage.com and run the following javascript code:document.getElementById("txtEmail").value="[email protected]";submit();void(0);

This works in a browser...how can I do it programatically?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about JavaScript