Mike25de Posted July 31, 2014 Share Posted July 31, 2014 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 More sharing options...
Danp2 Posted July 31, 2014 Share Posted July 31, 2014 No issues here. Are you sure that MozRepl is started? Provide a detailed description of the problems you have encountered and any steps you have already performed to troubleshoot them. Also some basics like OS version, AutoIt version, MozRepl version, etc would be nice. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Mike25de Posted July 31, 2014 Author Share Posted July 31, 2014 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 More sharing options...
Danp2 Posted August 1, 2014 Share Posted August 1, 2014 This is due to a change in the way TCPRecv works. Look in the FF UDF thread for a posted solution (IIFC, it's a single line change to __FFWaitForRepl). Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
junkew Posted August 1, 2014 Share Posted August 1, 2014 Depending on what you want iuiautomation can handle a lot with firefox without dependency on addons. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Mike25de Posted August 1, 2014 Author Share Posted August 1, 2014 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 More sharing options...
computergroove Posted August 1, 2014 Share Posted August 1, 2014 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 More sharing options...
Mike25de Posted August 1, 2014 Author Share Posted August 1, 2014 (edited) 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 August 1, 2014 by IAHIM Link to comment Share on other sites More sharing options...
Bert Posted August 1, 2014 Share Posted August 1, 2014 look here: '?do=embed' frameborder='0' data-embedContent>> The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
computergroove Posted August 1, 2014 Share Posted August 1, 2014 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 More sharing options...
Mike25de Posted August 1, 2014 Author Share Posted August 1, 2014 look here: '?do=embed' frameborder='0' data-embedContent>> Thanks for the link. Do you know where i can find a simple example of automating firefox? I saw that there is one, but i need something that integrates a form .. or mouse clicks. Thank you again for the link. Link to comment Share on other sites More sharing options...
junkew Posted August 1, 2014 Share Posted August 1, 2014 Latest simple spy will give you some code to start with when you highlight object with ctrl-w 232showtime 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now