Jump to content

Recommended Posts

Posted (edited)

Hello, I'm not very good with javascript elements, can you help me to have the logo link of google with FFCmd() function ?

CODE
#Include <FF.au3>

_FFStart()

If _FFIsConnected() Then

_FFOpenURL("http://www.google.com")

; href from an image link

$sHref = _FFCmd(".images[0].href")

If Not @error Then MsgBox(64,"Href of the first image-link:",$sHref)

Else

MsgBox(64,"Error:","Can't conncect to FireFox")

EndIf

My script isn't work, my problem is _FFCmd(".images[0].href") it's not correct.

Many thanks !

Edited by sambalec
Posted

Hello, I'm not very good with javascript elements, can you help me to have the logo link of google with FFCmd() function ?

CODE
#Include <FF.au3>

_FFStart()

If _FFIsConnected() Then

_FFOpenURL("http://www.google.com")

; href from an image link

$sHref = _FFCmd(".images[0].href")

If Not @error Then MsgBox(64,"Href of the first image-link:",$sHref)

Else

MsgBox(64,"Error:","Can't conncect to FireFox")

EndIf

My script isn't work, my problem is _FFCmd(".images[0].href") it's not correct.

Many thanks !

There are no "href" attribute for images. I think you mean "src":

(<img src="image.png">)

$sHref = _FFCmd(".images[0].src") ; index 0-n
; or
$sHref = _FFXpath("//img[1]","src",9) ; index 1-n

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
×
×
  • Create New...