Page 1 of 1

ExecuteJavaScript Issue

Posted: Thu Apr 30, 2020 1:46 pm
by Guilherme Cardozo
Good morning, I am manipulating WhatsApp Web through CEF4, I would like to close my application after sending an attachment.
However, while I'm debugging, it seems that after calling the MainFrame.ExecuteJavaScript method, nothing happens, the attachment is only sent after I give F9, can I really know when the command is executed?
I have little knowledge about CEF4, but when I delved into it, I saw that the attachment is actually sent after delphi runs HandleMessages.

Re: ExecuteJavaScript Issue

Posted: Thu Apr 30, 2020 4:03 pm
by salvadordf
Hi,

If you need to get results from a JavaScript command you can use the information in this thread to send the results to Delphi :
https://www.briskbard.com/forum/viewtop ... 251&p=5316

The trick "ForumReader" gave in that thread seems to be the easiest way.

Re: ExecuteJavaScript Issue

Posted: Mon May 04, 2020 11:14 am
by Guilherme Cardozo
Hi, thanks for reply.

I'm actually trying that through console.log, however the problem is the same.

Maybe the problem is on the JavaScript function.