Page 1 of 1

Re: How can I click a button using it x, y position?

Posted: Fri Aug 02, 2019 1:52 pm
by salvadordf
To send information from JavaScript to Delphi you can use JavaScript extensions.

JavaScript extensions are custom functions that you can call from JavaScript code but those functions execute Delphi code.

Remember that JavaScript is executed in the render process so you will need to send a process message with your coordinates from the Delphi code in your extension to the main browser process.

The JSRTTIExtension and JSExtension demos have all the code you need.

To test them follow these steps :
  • Run the demo and wait until google.com is loaded
  • Right-click and select the "Set the mouseover event" menu option.
  • Move the mouse pointer over the web page and see the HTML elements in the status bar.
Read the code comments in those demos for more details.