Variable in FFXpath Wertsetzung

  • Hallo,

    Bekomme es nicht hin das bei der erste FFXpath Wertsetzung die Variable $sText benutzt wird. Danke für Hilfe. Top Forum

    Hier der Pastebin link

    http://pastebin.com/yrdRS02d


    #cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.12.0
    Author: myName

    Script Function:
    Template AutoIt script.

    #ce ----------------------------------------------------------------------------

    ; Script Start - Add your code below here
    #Include <Array.au3>
    #Include <FF.au3>


    _FFStart("http://meineipadresse.de/","aline15",1,"False","127.0.0.1",default)
    ;Sleep(20000)
    If _FFIsConnected() Then
    ; MsgBox(64, "IP:", _FFXPath( "//div[@id='ipv4']/div[2]/strong", "", 9))
    $sText = _FFXPath("//table[@id='Tabelle1']/tbody/tr[2]/td[3]/p/b", "textContent", 9)
    ;MsgBox(1,"GiveOut",$sText)
    _FFOpenURL ("http://639650.xobor.com/anmeldung.php")
    ;_FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr/td[2]/input",$sText,"2")
    ;_FFSetValue($sText, "namen", "ID")
    ;_FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr/td[2]/input",$sText)
    _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr/td[2]/input","$sText")
    _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[3]/td[2]/input","value='firefox1'")
    ;_FFSetValue("firefox1", "puw", "ID")
    _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[5]/td[2]/input","value='firefox1@devfeko.de'")
    ;_FFSetValue("firefox1@devfeko.com", "mail", "ID")
    _FFClick(_FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[9]/td[2]/input","",9))
    ;Sleep(20000)
    ;_FFQuit()
    EndIf

    Mein Browser kommt mit der Quellcode eingabe nicht klar

    hier der pastebin link sorry für die umstände

    Schönen Tag

    Sharebeya

  • Danke für den Tip, nur verstehe es noch nicht so richtig wie ich auf die Rückgabe von der Seite zuvor zugreife und es dann in die das Eingabefeld der nächsten seite eintrage.

    $sText = _FFXPath("//table[@id='Tabelle1']/tbody/tr[2]/td[3]/p/b", "", 9)
    _FFOpenURL ("http://639650.xobor.com/anmeldung.php")
    _FFObj($sText,"value","autoit")

    So geht es nicht hmm?

  • Probier es mal so:

    [autoit]

    _FFXPath("//table[@id='Tabelle1']/tbody/tr[2]/td[3]/p/b", "", 9)
    $sText = _FFObj("xpath.value")
    _FFOpenURL ("http://639650.xobor.com/anmeldung.php")

    [/autoit]

    Wobei die Frage ist ob bei _FFXPath wirklich die 9 als ReturnType richtig ist und nicht eher 2.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Ich glaube ich konnte mich nicht richtig ausdrücken ich möchte das es einen wert von dem xpath

    "//table[@id='Tabelle1']/tbody/tr[2]/td[3]/p/b" auf der seite meineipadresse.de kopiert

    und es in das feld mit dem xpath

    "//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr/td[2]/input" auf der seite

    http://639650.xobor.com/anmeldung.php reinkopiert das wars.

    Sehr einfach in Selenium auszuführen nur dort sind if loops etc nicht so gut auszuführen...