Incompatible types: 'string' and 'procedure, untyped pointer or untyped param
Posted: Mon Jul 23, 2018 9:23 pm
Hello !
I'm testing how to get the contents of a label. Running this command on the google chrome console did work, but I tried to put in the component did not work. What am I doing wrong?
Code on console
Code in component
I'm testing how to get the contents of a label. Running this command on the google chrome console did work, but I tried to put in the component did not work. What am I doing wrong?
Code on console
Code: Select all
document.getElementsByClassName("label")[3].innerHTML;
Code in component
Code: Select all
procedure TMiniBrowserFrm.Button4Click(Sender: TObject);
var
X: String;
begin
X:=chromium1.browser.MainFrame.ExecuteJavaScript('document.getElementsByName("label")[3].innerHTML;','about:blank',0);
end;