How to use the code in java to do operations on the page in the browser?

For example, some logical calculations are carried out, and depending on the result that we get, the necessary button on the page is pressed.

Closed due to the fact that the essence of the issue is incomprehensible by the participants Alexey Shimansky , Cheg , AK , HamSter , br3t July 27, '17 at 8:43 pm .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • java or javascript yet? - Alexey Shimansky
  • just in java. need to make a window program. - Dany worner

1 answer 1

You can use WebView from JavaFX to load the page and use a WebEngine invoke a JavaScript script.

 webEngine.executeScript("...click()"); 

Tutorial can be viewed here: http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm