Jump to content

FF UDF Problems


GMK
 Share

Recommended Posts

I've just started using the FF UDF, trying to duplicate tasks that have been using the IE UDF. I'm using FireFox 3.5.7 and MozRepl 1.0.0.2009122217. However, after trying some of the examples, such as:

#include <Array.au3>
#include <FF.au3>

If _FFConnect() Then
    _FFTabAdd( "http://ff-au3-example.thorsten-willert.de/")

    ; counting the number of results from the Xpath query
    MsgBox(64, "Number of password fields:", _FFXPath( "//input[@type='password']", "", 10))

    ; the textContent from the query result
    MsgBox(64, "Fieldset-Legend:", _FFXPath( "//form[1]/fieldset/legend"))

    ; the textContent from option 2
    MsgBox(64, "Text from 0ption 5:", _FFXPath( "//option[2]"))

    ; Method and action of the first form
    $vTmp = "Method: " & _FFXPath( "//form[1]/@method") & @crlf
    $vTmp &= "Action: " & _FFXPath( "//form[1]/@action")
    MsgBox(64, "Form 2", $vTmp)

    ; array with the textContent of all options
    $aArray = _FFXPath("//option","value",7)
    _ArrayDisplay($aArray)

    ; working with the object returned from the query
    _FFXPath("//form[1]//input[@type='checkbox' and position()=2]","",9)
    MsgBox(64,"", _FFObj("xpath.type") & @crlf & _FFObj("xpath.value"))
    _FFObj("xpath.checked=true")

EndIf

I'm not getting any return values. Is there something I'm missing?

Edit: Upgraded to Firefox 3.6 and seeing some improvement.

I'm having problems now with _FFTableWriteToArray. Everytime I try to run the following example:

#include <FF.au3>
#include <Array.au3>

_FFStart("http://ff-au3-example.thorsten-willert.de/",default,2)

If _FFIsConnected() Then

    $aTable = _FFTableWriteToArray(0)
    _ArrayDisplay($aTable)
EndIf

I get:

>Running:(3.3.4.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\AutoIt3\Include\Examples\_FFTableWriteToArray.au3"    
_FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3
_FFConnect: AutoIt: 3.3.4.0
_FFConnect: FF.au3: 0.6.0.1
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     1680
_FFConnect: Browser:    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
__FFSendJavascripts: Sending functions to FireFox .......... done
_FFOpenURL: http://ff-au3-example.thorsten-willert.de/
__FFSend: try{window.content.top.document.location.href='http://ff-au3-example.thorsten-willert.de/';}catch(e){'_FFCmd_Err';};
__FFRecv: http://ff-au3-example.thorsten-willert.de/
_FFLoadWait: ... loaded in 578ms
__FFSend: try{FFau3 != null?1:0}catch(e){'_FFCmd_Err';};
__FFRecv: 1
C:\Program Files\AutoIt3\Include\FF.au3 (2827) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aTable[$i][$j] = $aCols[$j + 1]
$aTable[$i][$j] = ^ ERROR
->11:22:03 AutoIT3.exe ended.rc:1
>Exit code: 1    Time: 4.008
Edited by GMK
Link to comment
Share on other sites

  • 8 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...