Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Site element ID interaction

Post Reply
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Site element ID interaction

Post by salvadordf »

Hi,

There are several ways to access the DOM with CEF :
  • Using the CEF interfaces and functions. This is somewhat limited. You can search elements by the ID but you can't click on them. See the DOMVisitor demo.
  • Using JavaScript. This is the recommended method because you have absolute freedom to do whatever you want with the DOM.
  • Simulating mouse movements and key presses. The "Off-screen" mode (OSR) gives you total control of the mouse and keyboard events. You can record the events and then replay them. The OSR demos are more complex and you can't search elements by ID but if they are always drawn in the same position you can use this method.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Site element ID interaction

Post by salvadordf »

It's recommended that you use JavaScript to search elements by ID, interact with them, get the element coordinates, etc.

If you need to send some information back to Delphi then use a JavaScript extension as shown in the JSRTTIExtension or JSExtension demos.

If you search for the word "fill" in this forum you will find several people that created similar applications to fill forms automatically.
Post Reply