Jump to content

firefox au3 doesnt work for clicking on a button


 Share

Recommended Posts

hey guys, im from germany but seeking help her since here nobody can help me. Im trying to click a sign in button but nomatter whether i try it with ffclick oder indirectly via ffxpath, it wont work. on other sites it works fine . the buttons there seem to be different. so here´s the site and the html code of xpath that i get : https://www.deutschlandcard.de/netto-registrierung-az

<button class="button showStep2 next signupWithoutCard button-large" tabindex="0">Jetzt kostenlos anmelden</button>

i want to click the "jetzt anmelden" button

#Include <FF.au3>

Example()

Func Example()


    _FFStart("https://www.deutschlandcard.de/netto-registrierung-az", "default", 1, False) ; Die URL, FF-default-Profil, "1" für "immer neuen Prozess für FireFox starten", "False" für "sichtbar"


If _FFIsConnected() Then

    ;_FFClick("img", "tag", 5) ; clicks on the 5th image

    Sleep(1000)





_FFClick("button showStep2 next signupWithoutCard button-large","class")




    Sleep(10000)
    _FFWindowClose()
Else
    MsgBox(0,"Error:", "Can't connect to FireFox!")
EndIf

EndFunc

 

Link to comment
Share on other sites

You could try something like this --

#Include <FF.au3>

Example()

Func Example()


    _FFStart("https://www.deutschlandcard.de/netto-registrierung-az", "default", 1, False) ; Die URL, FF-default-Profil, "1" für "immer neuen Prozess für FireFox starten", "False" für "sichtbar"


If _FFIsConnected() Then
    $oButton = _FFXPath("//button[@class='button showStep2 next signupWithoutCard button-large']")
    _FFClick($oButton)
EndIf

EndFunc

 

Link to comment
Share on other sites

Both scripts worked here..

Im on FF V0.6.0.1b-15

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Your MozRepl off... FF version...
 idk

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

hmm ff and mozrepl are on the latest version.. with other scripts its working.. the only difference was that on other sites the button was always defined with an id, here on this site this button doesnt load a new page , it immediately jumps to the form. perhaps that can be the reason ? the strange thing is on other normal sites where the button is a "normal" button the script worked perfectly. so mozrepl autoit and firefox should be working fine. i am really really confused that it works for you . i was sure it has something with the html code to do.

Link to comment
Share on other sites

My firefox is v.50.1.0

I would clear the firefox cache and cookie associated. Other than that, no clue.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

omg i found the solution....... i downloaded the ff.au3 from your forum and it works fine... thanks careca and dan , your answer that it works for you made me think about what is different in germany... and then i knew the ff.au3 !! :D:D i downloaded it from a german page and not from this forum.

thanks guys thanks for the quick answers and willingness to help

Link to comment
Share on other sites

but i forgot there is another important question that i have.How do i read a text line ? the text is always at the same place

id give you the link but youve got to login for that, hopefully the html can help or my wrong script perhaps ?

$hallo = _FFXPath(".//*[@id='linkDCC']/div[1]/span[3]")

MsgBox(0,"hi",_FFObj($hallo))

 

Link to comment
Share on other sites

_FFReadText ?

maybe _FFObjGet. Im not much into it.

Danp2 knows for sure. Helped me much in the past.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

ok allright ill try it out  later... i know it might sound silly but right now im stuck with the radio button for male .. i really cant understand the _FFFormRadioButton Function..

<input class="mandatory" value="M" name="gender" tabindex="1" type="radio"/>

i understood it that way that the funcition only needs the value or name of the radio button ? Both variations, typing "M" in brackets after _FFFormRadioButton and "gender" do not work..

Link to comment
Share on other sites

now i tried it with the index wont work either... what am i doing wrong ? 

#Include <ff3.au3>

Example()

Func Example()


    _FFStart("https://www.deutschlandcard.de/netto-registrierung-az", "default", 1, False) ; Die URL, FF-default-Profil, "1" für "immer neuen Prozess für FireFox starten", "False" für "sichtbar"


If _FFIsConnected() Then
    $oButton = _FFXPath("//button[@class='button showStep2 next signupWithoutCard button-large']")
    _FFClick($oButton)
    Sleep(1000)
    _FFFormRadioButton(1, 0, "index")
EndIf

EndFunc

 

Link to comment
Share on other sites

i got it... im sry for the silly question  ... sry sry. i hope that later i will also understand how to read the text and wont be bothering you

for the ones who are interested , this is how it worked ( fu*k my brain, how silly am i ) 

_FFFormRadioButton("M", 1,"value")

how can i delete posts ?

Link to comment
Share on other sites

Dont worry about it, glad you solved it. But maybe next time just edit last post instead of posting again every few minutes ;)

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

ok :D so i got so far that im at the page with the text, but with both ways it doenst work. i think the html code is interesting, the text stands after a checkbox:

 

 

<input class="checkbox card-to-replace" name="cards[]" value="1263302459" tabindex="1" type="checkbox"/>
<label for="cards">1263302459</label>

xpath leads me only to the second line, i just added the line that stands above perhaps thats the solution .

hmm i just see now that i perhaps can get it by getvalue ?

after reading this textfield i would need it at another one too, but for that text perhaps your functions will work. first ill do it step by step and hopefully read this textline.

Link to comment
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
 Share

  • Recently Browsing   0 members

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