How to automate Firefox with iimInit ("-fx")

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

How to automate Firefox with iimInit ("-fx")

by Tech Support on Fri Jan 21, 2011 5:40 am

Update 10/11/2013

To automate iMacros for Firefox 8.5.1 or later you need iMacros Enterprise Edition 9.02 or later.

Conversely, if you are using iMacros Enterprise Edition 9.02 or later, you need iMacros for Firefox 8.5.1 or later to automate Firefox.

Update 6/13/2012

To automate Firefox 13 or later you need:

1. Download iMacros for Firefox V7.5.0.1 or later: http://wiki.imacros.net/iMacros_for_Fir ... on_History

2. Download iMacros V8.02.1960 or later: http://wiki.imacros.net/Version_History

To automate Firefox 12 or lower you need:

1. iMacros for Firefox V7.5.0.1: http://wiki.imacros.net/iMacros_for_Fir ... on_History

2. iMacros V8.01: http://wiki.imacros.net/Version_History

Note: With the combination of iMacros 8.01 and iMacros-FF 7.5.0.1, the use of iimRunner is once again supported on Windows XP.

Update 10/10/2011

To automate Firefox 6 or later you need:

1. Download iMacros for Firefox V7.4.0.4 or later: http://wiki.imacros.net/iMacros_for_Fir ... on_History

2. Download iMacros V7.50 or later. Or, just download iimfirefoxconnector.dll and save it in your current iMacros program folder.

Note: The use of iimRunner with Firefox via iimInit ("-fx -fxProfile <name> -runner") is not supported on Windows XP.

Original Post 1/21/2011

Problem: The iMacros Scripting Interface DLL IOpusConnector.xpt is not included in the most current general release iMacros for Firefox installer (XPI) to circumvent a known bug in Firefox 3.6.x.

Solution:
We have rewritten our Firefox driver to work around the Firefox bug and at the same time improved speed and reliability. Improved reliability means in this case that iMacros handles Firefox quirks better :)

The result is that iMacros can now fully automate all Firefox versions, including the latest Firefox 4 Beta.

To automate Firefox with the iMacros Scripting Edition, you need:

1. Download iMacros V7.22 or later: http://wiki.imacros.net/Version_History

2. Download iMacros for Firefox V7.3.0.0 or later: http://wiki.imacros.net/iMacros_for_Fir ... on_History

After you have installed the new version, you can use iimInit ("-fx") and iimInit ("-fx -fxProfile <name>") to drive Firefox just as before.

:arrow: If you find any problems, please let us know by replying to this post!
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by skabaas on Fri Jan 21, 2011 7:33 am

Installed the new Beta and the Firefox plugin... Seems like "-ie" or "-fx" stopped working? iimInit now always fires up the iMacros-browser?
skabaas
 
Posts: 16
Joined: Mon Sep 06, 2010 2:03 am

Re: How to automate Firefox with iimInit ("-fx")

by Tech Support on Fri Jan 21, 2011 7:41 am

I just retested and all works fine for me.

Did you uninstall any older iMacros 7 version? (Only iMacros V6.x can be used in parallel)
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by mjayson on Sat Jan 22, 2011 2:04 am

Great news!. Any new update on the native linux immrunner?
mjayson
 
Posts: 11
Joined: Thu Sep 02, 2010 1:10 pm

Re: How to automate Firefox with iimInit ("-fx")

by Tech Support on Sat Jan 22, 2011 2:53 am

Any new update on the native linux iimrunner?

The Windows and Linux Firefox Scripting interfaces share the same code base. We have one Linux specific bug left to fix. So I think that it can be ready next week.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by skabaas on Wed Jan 26, 2011 2:53 am

I figured out where I went wrong, but now I'm running into another little bug:

Firefox seems to handle imacros.iimGetLastExtract different than the normal iMacros browser:

Same code, same extract, different outcome:

iMacros browser:
Image

Firefox:
Image

However, when I use iimGetLastExtract(0) instead of iimGetLastExtract(1), I get the expected result!

Firefox:
Image
skabaas
 
Posts: 16
Joined: Mon Sep 06, 2010 2:03 am

Re: How to automate Firefox with iimInit ("-fx")

by Tech Support on Wed Jan 26, 2011 3:22 am

Strange, it works for us. Can you try with this script:

Code: Select all
Option Explicit
Dim iim1, iret
Dim rn, i, keyword
Dim code

code = "CODE:URL GOTO=google.com" + vbNewLine+ "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=NAME:q1 CONTENT=x"

set iim1= CreateObject ("imacros")
iret = iim1.iimInit("-fx",true)
MsgBox "Init" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()

iret = iim1.iimDisplay(iim1.iimGetInterfaceVersion())
MsgBox "Display" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
iret = iim1.iimPlay("Demo-Extract")
MsgBox "Play" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
Dim s,index
For index = 0 To 10 Step 1
s = iim1.iimGetLastExtract(index)
MsgBox s
Next
MsgBox "Extract" + vbCrLf + "Error Text: "+iim1.iimGetLastError()

MsgBox "Close browser"
iret = iim1.iimExit
MsgBox "Exit" + vbCrLf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
WScript.Quit(0)


You can see that the first extraction message box returns the all (separated by [EXTRACT]) and the other ones return one by one, until the last 3 return empty (there are only 7 extracts and 11 message boxes).

Please make sure you use the latest 7.20 build.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by skabaas on Wed Jan 26, 2011 3:38 am

Tech Support wrote:Strange, it works for us. Can you try with this script:

Code: Select all
Option Explicit
Dim iim1, iret
Dim rn, i, keyword
Dim code

code = "CODE:URL GOTO=google.com" + vbNewLine+ "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=NAME:q1 CONTENT=x"

set iim1= CreateObject ("imacros")
iret = iim1.iimInit("-fx",true)
MsgBox "Init" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()

iret = iim1.iimDisplay(iim1.iimGetInterfaceVersion())
MsgBox "Display" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
iret = iim1.iimPlay("Demo-Extract")
MsgBox "Play" + vbCrlf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
Dim s,index
For index = 0 To 10 Step 1
s = iim1.iimGetLastExtract(index)
MsgBox s
Next
MsgBox "Extract" + vbCrLf + "Error Text: "+iim1.iimGetLastError()

MsgBox "Close browser"
iret = iim1.iimExit
MsgBox "Exit" + vbCrLf + "Error Code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetLastError()
WScript.Quit(0)


You can see that the first extraction message box returns the all (separated by [EXTRACT]) and the other ones return one by one, until the last 3 return empty (there are only 7 extracts and 11 message boxes).

Please make sure you use the latest 7.20 build.


Does seem to work indeed (and yes, I am using the latest RC build). I get a couple of messageboxes and the extracting seems to work fine. However, I'm extracting from a combobox (which is not available in this example). Perhaps that's the problem?

Image

[edit]
That does seem to be the problem. Check out the following scriptcode, which makes use of this topic:

Code: Select all
Option Explicit
Dim iim1, iret
Dim rn, i, keyword
Dim code

code = "CODE:"
code = code + "VERSION BUILD=7201198" + vbNewLine
code = code + "TAB T=1" + vbNewLine
code = code + "TAB CLOSEALLOTHERS" + vbNewLine
code = code + "URL GOTO=http://forum.iopus.com/viewtopic.php?f=8&t=12254" + vbNewLine
code = code + "TAG POS=1 TYPE=SELECT FORM=ID:viewtopic ATTR=ID:st CONTENT=%14" + vbNewLine
code = code + "TAG POS=1 TYPE=SELECT FORM=ID:viewtopic ATTR=ID:st EXTRACT=TXT" + vbNewLine

set iim1= CreateObject ("imacros")

iret = iim1.iimInit("", true)

iim1.iimPlay(code)

MsgBox iim1.iimgetlastextract(1)


When you run the same code with the "-fx" parameter, you get an empty msgbox. When you run this code, you get "2 weeks".
[/edit]
skabaas
 
Posts: 16
Joined: Mon Sep 06, 2010 2:03 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Wed Jan 26, 2011 9:49 am

Hi skabbas,

Thank you for the detailed report and sample code. We are working on resolving the issue.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3298
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by ejerue on Tue Feb 01, 2011 2:05 pm

I am unable to get FireFox 4 beta 10 to launch from a perl script on Windows 7 64 bit w/ 7.20 & 7.1.1.1 extension (compatibility check disabled in FireFox to allow install). I have yet to get any version of FireFox to launch actually but figured that was due to the bugs w/ firefox and was waiting for this release. IE and the iMacros browsers successfully launch and run from this same script. I have the iMacros extension pane open in FireFox and am at a loss as to why it will not run.
ejerue
 
Posts: 1
Joined: Wed Aug 11, 2010 9:32 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Thu Feb 03, 2011 5:19 am

Thanks again for reporting the issue Erik, we are working on a fix.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3298
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by Tech Support on Thu Feb 03, 2011 2:32 pm

We released V7.1.1.2 that solves the issue with Firefox 4 Beta 10:

http://wiki.imacros.net/iMacros_for_Fir ... on_History
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by mjayson on Tue Feb 08, 2011 9:04 pm

We just tried the new version and got an error (see attachment).

IMacros version 7.20.1184

Firefox 3.6.13 with plug-in 7.1.1.2

We'll launching the macros through php with iimrunner.

The macro seems to be running even despite the error messages, anyone else got the same message?

Thanks
Attachments
imacros-error.jpg
mjayson
 
Posts: 11
Joined: Thu Sep 02, 2010 1:10 pm

Re: How to automate Firefox with iimInit ("-fx")

by Tech Support on Wed Feb 09, 2011 5:48 am

We'll launching the macros through php with iimrunner

iimRunner is not yet supported with the new Firefox interface. We are working on it right now and plan to have a solution early next week.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: How to automate Firefox with iimInit ("-fx")

by echan00 on Tue Feb 22, 2011 12:07 pm

What if I'm using iMacros for Firefox? (http://www.iopus.com/download/imacros-firefox/)

I don't use "iimInit ("-fx")" as I am only using the simple scripting for the browser plugin... will the same fix for the browser plug-in be done?
echan00
 
Posts: 10
Joined: Mon Feb 21, 2011 8:59 pm

Next

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest

-->