Recent

Author Topic: Programatically open a link in fpCEF3  (Read 2391 times)

mhoude

  • Newbie
  • Posts: 3
Programatically open a link in fpCEF3
« on: June 14, 2017, 01:23:53 am »
Hi,

I'm fairly new to fpCEF3 and I have a project where I need to open a link programmatically to open a second login page.

The code on the initial page is as follows:

Code: Pascal  [Select][+][-]
  1. <a href="/t-login.html?targetUrl=L2gtZ3JhbmQtbW9udHJlYWwvODAwMDJeYTBUbWduakZRdTVBVm9qTGw3T3VGdz09" class="headerButtonAnonymousLink-2289432721" rel="nofollow" title="Connexion" data-reactid="25">Connexion</a>

Is there a way to achieve this with fpCEF3 ?

Thanks in advance.


mhoude

  • Newbie
  • Posts: 3
Re: Programatically open a link in fpCEF3
« Reply #1 on: June 20, 2017, 05:32:51 am »
I tried to do it like this but it doesn't seems to work:

Code: Pascal  [Select][+][-]
  1. procedure TMainform.ChromiumLoadEnd(Sender: TObject;
  2.   const Browser: ICefBrowser; const Frame: ICefFrame; httpStatusCode: Integer);
  3. var jscode: String;
  4. begin
  5.   jscode := 'document.getElementByClassName("headerButtonAnonymousLink-2289432721")[0].click();';
  6.   Frame.ExecuteJavaScript(jscode, Frame.GetUrl, 0);
  7. end;
  8.  

Any ideas ?

Any help will be much appreaciated.

Thanks  :)

mhoude

  • Newbie
  • Posts: 3
Re: Programatically open a link in fpCEF3
« Reply #2 on: June 23, 2017, 02:56:31 am »
I moved to Qt.

Thanks anyway.

 

TinyPortal © 2005-2018