I need to get the value of a href through an id in a website

169 views
Skip to first unread message

reizinho...@gmail.com

unread,
Oct 28, 2017, 9:25:18 AM10/28/17
to delphichromiumembedded
I need to get the value of a href through an id in a website, I already tried it in several ways and could not, could you exemplify how it works in Delphi? I load the site normally on the chromium, I execute javascript to insert a value into an input, I execute javascript to click a button, until it works perfectly but I need a link that comes after the button is clicked, it gets in an id = 'title 'href =' ', I need to get the link that is inside the href, I hope it has been able to understand, Thank you very much in advance.


Obs: in the attached print, follow the link within the href I need to get in my Delphi application

Capturar.PNG
Message has been deleted

Cars, Quads, Bikes and more

unread,
Feb 19, 2018, 6:18:48 AM2/19/18
to delphichromiumembedded
Just get the html source code and search for your value.

procedure CallbackGetSource(const src: ustring); // CallbackGetSource is fired after the end of ChromiumLoadEnd procedure
begin
  Form1.memo1.text := src; //HTML page code is in src
end


procedure TForm1.ChromiumLoadEnd(Sender: TObject; const Browser: ICefBrowser;
  const Frame: ICefFrame; httpStatusCode: Integer);
begin
  chromium.Browser.MainFrame.GetSourceProc(@CallbackGetSource);
end;
Reply all
Reply to author
Forward
0 new messages