Jump to content
Sign in to follow this  
anOldLongUser

[FF.au3] How to get javascript : console.log

Recommended Posts

anOldLongUser

Hello sirs,

currently i am looking for a way to read console.log from a web page opened by FF.au3, here is my code.

when i manually browse facebook.com and open the console  ( F12 ) , i can see facebook message warn us from pasting anything there.

however when i try to get the console.log from FF.au3 the code just return this : function() {...}

thank you for the help

#include 'FF.au3'

 


_FFStart("https://www.facebook.com/?_rdr","default",2,false)


If _FFIsConnected() Then
    Sleep(3000)
    $log = _FFCmd("window.console.log")
    If Not @error Then MsgBox(64,"Log:",$log)

EndIf

Edited by anOldLongUser

Share this post


Link to post
Share on other sites
anOldLongUser

hello,

i just figure out, i just need to use :

javascript : window.document.title={data in console log}

and in autoit :

$sHref = _FFCmd(".title")
 If Not @error Then MsgBox(64,"Current href:",$sHref)

 

this seem a little dirty hack but it works in my case. thank everyone for help

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×