_FFClick ab FireFox 22.0

  • Hallo,
    ab FireFox 22.0 scheint _FFClick nicht mehr zu funktionieren.
    Hat jemand eine Idee/Lösung?

    Habe mein Script auf Minimalversion reduziert.

    • Aufruf der Seite
    • entsprechendes Feld mit Artikelnummer beschicken (_FFObj )
    • und der Versuch es abzuschicken (_FFClick) auf Button "Suchen"


    Leider passiert bei FireFox 22.0 nichts, mit FireFox 19.0.2 als auch FireFox 21.0 gab es keine Probleme!
    "Die Umgebung:
    __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.HSE24.at" "-repl 4242 "
    _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1
    _FFConnect: AutoIt: 3.3.8.1
    _FFConnect: FF.au3: 0.6.0.1b-8 (aus engl.sprachigem Forum) aber auch mit 0.6.0.1b-3 und 0.6.0.1b-7 getestet
    _FFConnect: IP: 127.0.0.1
    _FFConnect: Port: 4242
    _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 bzw. 21.0 und 19.0.2
    "
    Mein Testscript (mit HTMLCode des Buttons als Komentar):

    [autoit]


    #Tidy_Parameters=/pr=1 /tc=4 /uv=3 /reel /sci=9 /gds /gd=1
    #include <FF_0.6.0.1b-8.au3>
    AutoItSetOption("MustDeclareVars", 1)
    AutoItSetOption("WinTitleMatchMode", 2)
    Global $_FF_COM_TRACE = True ; Trace communication to console (debugging)
    dim $sArtNr = "999999"
    Dim $URL = "http://www.HSE24.at"
    Dim $rc , $i ; work fields

    [/autoit][autoit][/autoit][autoit]

    If Not _FFStart($URL) Then Err(998, "FF-Start: failed.")
    consolewrite(@crlf&"---------------------- FF Started ok---------------------------------"&@crlf)

    [/autoit][autoit][/autoit][autoit]

    $rc = _FFObj(_FFXPath("id('header:searchfied')", "", 9), "value", $sArtNr) ; set ArtNr ?
    consolewrite(@crlf&"---------------------- enter ArtNr ins field ok -------------------"&@crlf)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $rc = _FFClick("header:search_submit_button","id") ; works including FireFox 19.0.1sleep(1000)
    ;------------------------------------------------ ; but no effect sonce FireFox 22.0.0
    ;sleep(1000)
    consolewrite(@crlf&"---------------------- nothing hapens/ no error -------------------"&@crlf)
    ;sleep (5000)
    ;send("{Enter}") ; has also no effect

    [/autoit][autoit][/autoit][autoit]

    exit
    #cs ;-------------------------------------- HTML-code of Button ----------------------------------------
    <div class="searchfield-wrapper">
    <input id="header:searchfied" class="text" type="text" autocomplete="off" name="SearchParameter" value="Begriff oder Bestellnr."></input>
    <input id="header:search_submit_button" class="box-btn-search" type="submit" style="position:absolute;" alt="Abschicken" title="Suchen" value="Suchen" name="search_submit_button"></input>
    <br class="clear-block"></br>
    <div id="searchfield-layer" class="searchfield-layer"> …
    </div>
    </div>

    [/autoit][autoit][/autoit][autoit]

    #ce
    Func Err($FehlerNR, $Txt1, $Txt2 = "") ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    If MsgBox((5 + 32) * (StringRight($FehlerNR, 1) = "R") + (16 + 4096) * (StringRight($FehlerNR, 1) <> "R"), _
    "Fehler: " & StringRegExpReplace($FehlerNR, "(\d*)(.*)", "$1"), _
    $Txt1 & @CRLF & $Txt2) _
    = 4 Then ; Retry-Antwort nur wenn erlaubt
    Return StringRegExpReplace($FehlerNR, "(\d*)(.*)", "$1")
    Else
    Exit StringRegExpReplace($FehlerNR, "(\d*)(.*)", "$1")
    EndIf
    EndFunc ;==>Err

    [/autoit]


    Protokoll FireFox 22.0

    Spoiler anzeigen


    __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.HSE24.at" "-repl 4242 "
    _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1
    _FFConnect: AutoIt: 3.3.8.1
    _FFConnect: FF.au3: 0.6.0.1b-8
    _FFConnect: IP: 127.0.0.1
    _FFConnect: Port: 4242
    _FFConnect: Delay: 2ms
    _FFConnect: Socket: 640
    _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
    __FFSendJavaScripts: Sending functions to FireFox .......... done
    _FFLoadWait: . loaded in 16ms
    [object XrayWrapper [object HTMLDocument]] - {__noscriptStorage: {...}, __noScriptEarlyScripts__: "http://www.hse24.at/", _noscriptAfterSurrogates: true, location: {...}, addEventListener: function() {...}, removeEventListener: function() {...}, dispatchEvent: function() {...}, ...}

    ---------------------- FF Started ok---------------------------------
    __FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("id('header:searchfied')",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;};
    __FFRecv: [object XrayWrapper [object HTMLInputElement]] - {stepUp: function() {...}, stepDown: function() {...}, checkValidity: function() {...}, setCustomValidity: function() {...}, select: function() {...}, setSelectionRange: function() {...}, mozIsTextField: function() {...}, ...}
    __FFSend: try{FFau3.xpath.hasAttribute('value')}catch(e){'_FFCmd_Err';};
    __FFRecv: 1
    __FFSend: try{FFau3.xpath.value='999999'}catch(e){'_FFCmd_Err';};
    __FFRecv: 999999

    ---------------------- enter ArtNr into field ok -------------------
    __FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('header:search_submit_button'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};
    __FFRecv: 1
    _FFLoadWait: . loaded in 16ms
    [object XrayWrapper [object HTMLDocument]] - {__noscriptStorage: {...}, __noScriptEarlyScripts__: "http://www.hse24.at/", _noscriptAfterSurrogates: true, location: {...}, addEventListener: function() {...}, removeEventListener: function() {...}, dispatchEvent: function() {...}, ...}

    ---------------------- nothing hapens/ no error -------------------
    +>11:30:08 AutoIT3.exe ended.rc:0
    >Exit code: 0 Time: 6.363


    Protokoll FireFox 21.0

    Spoiler anzeigen


    __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.HSE24.at" "-repl 4242 "
    _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1
    _FFConnect: AutoIt: 3.3.8.1
    _FFConnect: FF.au3: 0.6.0.1b-8
    _FFConnect: IP: 127.0.0.1
    _FFConnect: Port: 4242
    _FFConnect: Delay: 2ms
    _FFConnect: Socket: 644
    _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
    __FFSendJavaScripts: Sending functions to FireFox .......... done
    _FFLoadWait: . loaded in 16ms
    [object HTMLDocument] - {__noscriptStorage: {...}, __noScriptEarlyScripts__: "http://www.hse24.at/", _noscriptAfterSurrogates: true, location: {...}, addEventListener: function() {...}, removeEventListener: function() {...}, dispatchEvent: function() {...}, ...}

    ---------------------- FF Started ok---------------------------------
    __FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("id('header:searchfied')",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;};
    __FFRecv: [object HTMLInputElement] - {addEventListener: function() {...}, removeEventListener: function() {...}, dispatchEvent: function() {...}, defaultChecked: false, disabled: false, checked: false, type: "text", ...}
    __FFSend: try{FFau3.xpath.hasAttribute('value')}catch(e){'_FFCmd_Err';};
    __FFRecv: 1
    __FFSend: try{FFau3.xpath.value='999999'}catch(e){'_FFCmd_Err';};
    __FFRecv: 999999

    ---------------------- enter ArtNr into field ok -------------------
    __FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('header:search_submit_button'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};
    __FFRecv: 1
    _FFLoadWait: . loaded in 16ms
    [object HTMLDocument] - {__noscriptStorage: {...}, __noScriptEarlyScripts__: "http://www.hse24.at/", _noscriptAfterSurrogates: true, location: {...}, addEventListener: function() {...}, removeEventListener: function() {...}, dispatchEvent: function() {...}, ...}

    ---------------------- OK -------------------
    +>11:21:35 AutoIT3.exe ended.rc:0
    >Exit code: 0 Time: 6.266


    MfG
    DerPensionist[/list]

  • Erlaubt hse24.de eine solch automatisierte Suche überhaupt?
    Den an diesme Punkt möchte ich dich mal auf die Forenregeln hinweisen...

    MfG

    There's a joke that C has the speed and efficieny of assembly language combined with readability of....assembly language. In other words, it's just a glorified assembly language. - Teh Interwebz

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, you blow off your whole leg. - Bjarne Stroustrup
    Genie zu sein, bedeutet für mich, alles zu tun, was ich will. - Klaus Kinski

    Einmal editiert, zuletzt von PainTain (30. Juli 2013 um 13:11)