Jump to content

any up to date Firefox automation howto ?


Recommended Posts

Hi guys,

I have been looking today for a way to automate Firefox or embed it into Autoit GUI just like IE. I have found a lot of old posts with solutions that are not really up to date or working.

I have tried FF.au3 but i believe that MozRepl is too old for Firefox 31.

Can anyone give me a working solution or send me to the right documentation?

Thanks in advance,

Mike

Link to comment
Share on other sites

Of course MozRepl was not started. But now it should work... except that i have an error.

I am running win 7 ultimate  firefox 31 and the last version of autoit.

My code is:

#include "ff.inc.au3"



; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
    ; open a page
    _FFOpenURL("http://youtube.com/")
    Sleep(3000)
;~  $sObj = _FFXpath("//a[@href='http://www.mihaidesign.com/contact/']","",9) ; get the image with the alt-text test_bild_3 ...
;~  _FFClick($sObj) ; ... and click on it

    ; disconnect from FireFox
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
 EndIf

The ERROR i get is :

__FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv:-1

Thank you in advance for your help.

Link to comment
Share on other sites

thanks guys, i managed to fix the ff.au3 and i got it working.

Now another issue:

I want to click a span inside a table ... that is refreshed via ajax every 2 seconds. I tried getting the xpath but when i call the _FFClick it doesn't work. 

I can click other spans that are not generated via javascript.

Is there a way to accomplish this?  I have spent 2-3 hours looking into workarounds... maybe you guys know more.

Thanks again for all the help!

Link to comment
Share on other sites

thanks guys, i managed to fix the ff.au3 and i got it working.

Now another issue:

I want to click a span inside a table ... that is refreshed via ajax every 2 seconds. I tried getting the xpath but when i call the _FFClick it doesn't work. 

I can click other spans that are not generated via javascript.

Is there a way to accomplish this?  I have spent 2-3 hours looking into workarounds... maybe you guys know more.

Thanks again for all the help!

Does the ajax data change every 2 seconds? Can you share the URL and identify the link you are trying to click so we can try it?

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

Hi Computergroove,

I can't share it because is the web interface of a wireless access point. I need to change the password for the public SSID every morning.

The access point is behind 2 firewalls so is not publicly accessible.

The data changes every 2 seconds... and i have to click a span that triggers another DIV to be shown ... and there i have to click another link.

 

It seems that the only solution i can use .... is to use mouse clicks at specific coordinates... which is crappy ... and can not be really trusted.

Edited by IAHIM
Link to comment
Share on other sites

Hi Computergroove,

I can't share it because is the web interface of a wireless access point. I need to change the password for the public SSID every morning.

The access point is behind 2 firewalls so is not publicly accessible.

The data changes every 2 seconds... and i have to click a span that triggers another DIV to be shown ... and there i have to click another link.

 

It seems that the only solution i can use .... is to use mouse clicks at specific coordinates... which is crappy ... and can not be really trusted.

It's true that clicking coords is not always reliable. What about sending the tab key x  number of times and hitting space? I have automated several websites this way.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

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...