Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expect to add support for the imacros API code
#1
I am a web page testing beginners, the programming is not very understanding, on the Internet of more than 10 kinds of web automation tools and found two relatively the most powerful software: one is Selenium, the other is imacros, and they firefox browser There are plug-ins, are free, and are equipped with IDE editing interface!

I have been through hundreds of Web page automation testing, found that this plug-in for beginners imacros, more simple, easy to use, the most important is the success rate of the script to run a lot higher than Selenium, plug-in update frequency is high, Internet forums have a high reputation,There are millions of fans! so I sincerely recommend QM developers like Selenium, through two buttons, the imacros generated script, paste in the QM call (as shown below) I am looking forward to , And heartfelt thanks!

Download the latest version of firefox:
https://download-installer.cdn.mozilla. ... 50.1.0.exe

IMacros firefox plugin link:
https://addons.mozilla.org/en-US/firefo ... r-firefox/

IMacros API content links:
http://imacros.net/overview/api


Attached Files Image(s)
   
#2
From the iMacros API web page:
Quote:The iMacros Enterprise Edition automatically installs the Web Browser API.

If iMacros API is installed, you can use it in QM now. Nothing special needed. Look in menu Tools -> COM libraries.
#3
I do not know how to use the API, can you provide an example? thank you very much!

I found in everyday use imacros than Selenium success rate is much higher, so very much want to use it in the QM!
#4
Please find iMacros library in the COM Libraries dialog (QM Tools menu). Double click, close. What text it inserts in the macro?
#5
No library files found

I want to add some QM commands to the imacros code to implement some interactive functionality


Attached Files Image(s)
   
#6
Are you sure that iMacros Enterprise and its API are correctly installed on your computer?
#7
I just installed firefox browser plugin, I just figured out that the original need iMacros Enterprise Edition automatically installs, is that you must pay to use the API? Free can not use the API?
#8
http://imacros.net/store/compare-versions
says that the free plugin does not offer any API.
Do you know some other API or other way to automate the plugin? I an not familiar with it, would need many time to learn.
#9
I found in the foreign forums imacros latest version of the software registration, installation of imacros software, the installation file can be covered, but do not know how to call, it seems I have to learn about programming, and see imacros software API Introduction, feeling very powerful, after all, is the commercial version of the software! Thank you very much for your prompt!

Link:http://teamreis.altervista.org/forum/showthread.php?tid=1130
#10
With this iMacros.WinUI.Common.dll file, I can directly use? How to use it? Smile
#11
I really feel QM + iMacros together, will become the omnipotent, and look forward to you have a good example to share, and now find a great tool, and then I have to study hard programming! thanks again Big Grin
#12
Can automate the iMacros plugin using its user interface.

Macro Run iMacros script in Firefox
Code:
Copy      Help
;the script
;str imm="ExtractURL.iim"
;str imm="FillForm.iim"
;str imm="Open6Tabs.iim"
str imm="Filter.iim"

int w=win("- Mozilla Firefox" "MozillaWindowClass")

;find the Play button in the iMacros sidebar
Acc aPlay.Find(w "PUSHBUTTON" "Play" "" 0x1011)

;find and select the iMacros script in the list in the iMacros sidebar
Acc a.Find(w "OUTLINEITEM" imm "" 0x1011)
a.DoDefaultAction ;;selects

;run it
aPlay.DoDefaultAction

;wait until finished
rep() 0.02; if(aPlay.State&STATE_SYSTEM_UNAVAILABLE=0) break

mes "finished"
#13
Thank you for your reply, your method is very good, but only in the iMacros browser running, can not use the programming statement!

The biggest strength of iMacros is that you can generate Selenium C # code so that I can run the code on other browsers instead of running on iMacros' browser

I recorded an iMacros installation of the video, and the iMacros generated C # code, copy to the QM, but can not run, help me look at the situation? thank you very much!

Video link:
https://youtu.be/ge4_PNpdG2M

File Link:
https://drive.google.com/drive/folders/ ... sp=sharing
#14
Now there is a link library (the picture below), but I do not know how to call the programming level too bad! Cry


Attached Files Image(s)
   
#15
In the COM Libraries dialog double click it. It adds this in the macro
typelib iMacros {GUID} version

Then add
iMacros.App x._create

Then you can use class member functions with x, like x.Function(arguments).

Read more in QM help topic "Using COM components" -> Example1.
#16
Or export the iMacros script to VBScript and run the code in QM, like:

Macro Macro2728
Code:
Copy      Help
str code=
;VERSION...
;TAB...
;...
VbsExec code

Also can run C# code, but need to know the .NET dll path and the namespace. Maybe don't need the dll path if the dll is installed in the .NET assembly cache; then need just the namespace name, to add code line 'using Namespace;'.
#17
Very grateful, I was watching QM help document! The above video link, on Selenium C # code, how to call? Can give pointers about?

I use the following article in the link to generate the Selenium C # code that works perfectly in QM

Selenium web recorder and QM
#18
iMacros exports C# code that uses its .NET library. It is not Selenium code.

QM can run C# code, but need to know the .NET dll path and the namespace.
Don't need the dll path if the dll is installed in the .NET assembly cache; then need just the namespace name, to add code line 'using Namespace;'. You can find it in iMacros C# samples.
QM code can be:

Macro Scripting C#, run Main function, args2
Code:
Copy      Help
CsExec("")


#ret
//C# code
using System;
using System.Windows.Forms;
using iMacros; //need this. Replace iMacros with the real namespace name.

class Test
{
static void Main()
{
,//add the exported C# code here
}
}
#19
Not really understand, I first collection, and later a good level of programming, and then come back to see, thank you very much for your reply! Smile
#20
It seems the namespace is iMacros.Status. Try this:

Macro Scripting C#, run Main function, args2
Code:
Copy      Help
CsExec("")


#ret
//C# code
using System;
using iMacros.Status;

class Test
{
static void Main()
{
,//add the exported C# code here
}
}
#21
QM generated into exe file, iMacros generated code, not installed iMacros can run on the computer? If not, how can run? Put the Dll file and exe file together?
#22
Need to test. Yes, put the files together.
#23
Does the above code run without errors?
In any case, if iMacros not installed, it will fail. Use this code instead:

Macro Scripting C#, run Main function, args2
Code:
Copy      Help
;CsExec("")

;If the above says "The type or namespace name 'iMacros' could not be found", use the following code.
;At first copy iimInterface.dll from iMacros folder to QM folder (or to QM-created exe folder).

CsScript x
x.SetOptions("references=iimInterface.dll") ;;maybe don't need ".dll", don't remember
x.Exec("")


#ret
//C# code
using System;

class Test
{
static void Main()
{
,//add the exported C# code here
}
}
#24
Which is the dll file? QM can automatically put the Dll file to exe the same directory?
#25
I don't know exactly, but this page says it is iimInterface.dll.
http://wiki.imacros.net/Web_Scripting

QM does not copy the dll file.
#26
Thank you very much, all the questions are perfect answer!

Really feel QM is a versatile, perfect combination of recording + code, and strive to learn QM, and then flexibly use iMacros, desktop applications and network applications, I will get all!

Later, I intend to put some of my cases, recording video tutorials, share to the QM forum, youtube ... ... so that more people know the power of QM, QM than AHK, easier to get started, more powerful!
#27
I updated the latest code
Expect to add support for the imacros API code
#28
That would be great, I will wait for your good news!

I post in the following, the reference to add a collection code function, it is recommended to consider, because for beginners, very intimate!

It is recommended to add a collection code utility button!
#29
Hi, I tried it and made an error:

Metadata file 'c:\Program Files\Quick Macros 2\iimInterface.dll' could not be opened

Operate the video link:

https://youtu.be/PG5K1IEk1YQ
#30
I guess that it is not that dll. It is the COM dll. Need the .NET dll. I don't know which dll it is. I guess that it is installed in .NET GAC, it means that don't need any dlls in QM folder and don't need that SetOptions line in the QM macro. Try to remove it.


Forum Jump:


Users browsing this thread: 1 Guest(s)