Feedback and Issues on EVENT Recording Mode.

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

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.

Re: Feedback and Issues on EVENT Recording Mode.

by chivracq on Fri Dec 05, 2014 1:34 pm

Some excuse to bump this Thread...!:
One more User complaining about the Wiki Page for the EVENT Mode...:
- wiki page for EVENT
additional001 wrote:There is a grammatical error on the wikki page for EVENT. http://wiki.imacros.net/EVENT

Under Notes section:

We are especially interested to hear about in websites that do not not despite using the new EVENT(s) command.


I've read this like 5x and I still don't get what they are looking for.

Also think they should add some parameters for the Parameter's section. Not having a complete list prevents writing them from hand. It's like not listing them for TAG. Could you imagine trying to do that by not knowing TYPE POS or ATTR????

.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Feedback and Issues on EVENT Recording Mode.

by viking on Sat Oct 17, 2015 3:04 pm

This post describes another situation where the EVENT command fails:
http://forum.imacros.net/viewtopic.php?f=11&t=25188ecord
viking
 
Posts: 206
Joined: Sun Mar 16, 2008 12:22 am

Re: Feedback and Issues on EVENT Recording Mode.

by alex686 on Wed Oct 21, 2015 12:13 am

Hi!

I've created a JS script where I use EVENT directives for inputing text in comment's fields on one Russian social network site. Script works fine as long as I keep Firefox window focused. Whenever I switch focus on another app (for example on skype), the script begins to fail.

I've tried to get rid of all the EVENT directives replacing them with the TAG but there is one directive that I can not substitute with TAG - the one that sends chars to the input field. Now whenewer I loose focus from Firefox window the script fails on this particular EVENT directive. How can I solve this problem?

I use Firefox 41.0.2 and iMacros 8.9.4
iMacros for Firefox: 8.9.7
Firefox: 49.0.1
Pale Moon: 27.0.2
OS: Arch Linux, Windows 10

Manage iMacros from your mobile device: https://manage.getbot.ru
User avatar
alex686
 
Posts: 32
Joined: Tue Oct 20, 2015 11:48 pm

Re: Feedback and Issues on EVENT Recording Mode.

by Tom, Tech Support on Wed Oct 21, 2015 5:17 am

Hi alex686,

Sorry, I am unable to reproduce this behavior. I tested the attached sample macro in Firefox 41.0.2 with iMacros 8.9.4 and even minimized the browser window completely and it still ran successfully for me. Would you please try this macro also.
Attachments
FillForm-EVENT.zip
(464 Bytes) Downloaded 75 times
Regards,

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

Re: Feedback and Issues on EVENT Recording Mode.

by chivracq on Wed Oct 21, 2015 9:59 am

alex686 wrote:Hi!

I've created a JS script where I use EVENT directives for inputing text in comment's fields on one Russian social network site. Script works fine as long as I keep Firefox window focused. Whenever I switch focus on another app (for example on skype), the script begins to fail.

I've tried to get rid of all the EVENT directives replacing them with the TAG but there is one directive that I can not substitute with TAG - the one that sends chars to the input field. Now whenewer I loose focus from Firefox window the script fails on this particular EVENT directive. How can I solve this problem?

I use Firefox 41.0.2 and iMacros 8.9.4


Tom, Tech Support wrote:Hi alex686,

Sorry, I am unable to reproduce this behavior. I tested the attached sample macro in Firefox 41.0.2 with iMacros 8.9.4 and even minimized the browser window completely and it still ran successfully for me. Would you please try this macro also.

Code: Select all
VERSION BUILD=8940826 RECORDER=FX
TAB T=1
URL GOTO=http://demo.imacros.net/Automate/TestForm1
SET !REPLAYSPEED MEDIUM
EVENT TYPE=CLICK SELECTOR="#name" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#name" CHARS="Tom, Tech Support"
EVENT TYPE=CLICK SELECTOR="#food" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#food>OPTION:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#drink" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#drink>OPTION:nth-of-type(4)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#medium" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#dessert>OPTION:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#demo>FIELDSET>OL>LI:nth-of-type(7)>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#demo>FIELDSET>OL>LI:nth-of-type(7)>TEXTAREA" CHARS="Test_{{!NOW:hhhnnmsss}}"
EVENT TYPE=CLICK SELECTOR="#demo>FIELDSET:nth-of-type(2)>BUTTON" BUTTON=0

Yep, no Pb either running Tom's Test Macro (I just added the '{{!NOW}}' Var in the 'Remarks' Field to be sure that the Macro run completely when running it several times...) in all kinds of Minimized Window (even if I discovered a new funny little Bug, I think I will report it in some apart Post in this Thread or in some apart Thread (as I don't think it's related to the EVENT Mode)), but I suspect that 'alex686' (who didn't post his Script...) is using the cumbersome on the fly Syntax in .js Scripts (which seems to be very popular among Users who want to use iMacros for posting on Social Sites... :mrgreen: , sbd must one day have posted such a Script on some obscure Forum some years ago and that Script has (a bit stupidly in my Opinion...) gone viral since...) like this other User in this other Thread:
- Problem where trying make post to google+
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Feedback and Issues on EVENT Recording Mode.

by alex686 on Tue Oct 27, 2015 8:46 am

Hi guys!

Sorry for making you wait, I haven't set up email notification on updating of this thread and did not know you answered so fast. Thanks for this by the way.

I've tried Tom's script and it works fine with Firefox being not focused. Then I've tested my script thoroughly and can now conclude that the problem is not in the EVENT directive.

I've replaced the EVENT statement in my code with the javascript function to test the behaviour of the script. Here is a piece of my code configured for running on iMacros' test site. You can save it to text file with js extension and run from iMacros with Firefox focused and not.

Code: Select all
//imacros-js:showsteps no

function setCaretPosition(selector, caretPos) {
  var el = window.document.querySelector(selector);

  el.value = el.value;
  // ^ this is used to not only get "focus", but
  // to make sure we don't have it everything -selected-
  // (it causes an issue in chrome, and having it doesn't hurt any other browser)

  if (el !== null) {

    if (el.createTextRange) {
      var range = el.createTextRange();
      range.move('character', caretPos);
      range.select();
      return true;
    }

    else {
      // (el.selectionStart === 0 added for Firefox bug)
      if (el.selectionStart || el.selectionStart === 0) {
        el.focus();
        el.setSelectionRange(caretPos, caretPos);
        return true;
      }

      else  { // fail city, fortunately this never happens (as far as I've tested) :)
        el.focus();
        return false;
      }
    }
  }
}

function insertTextAtCursor(text) {
  var sel, range, html;
  if (window.getSelection) {
    sel = window.getSelection();
    if (sel.getRangeAt && sel.rangeCount) {
      range = sel.getRangeAt(0);
      range.deleteContents();
      range.insertNode( window.document.createTextNode(text) );
    }
  } else if (window.document.selection && window.document.selection.createRange) {
      window.document.selection.createRange().text = text;
  }
}

iimPlayCode('URL GOTO=http://demo.imacros.net/Automate/TestForm1');

iimPlayCode('WAIT SECONDS=3');

setCaretPosition('#demo>fieldset>ol>li>textarea', 1);

iimPlayCode('WAIT SECONDS=3');

insertTextAtCursor('Aloha from Hawaii!');



When you switch focus from Firefox, the "Aloha..." text does not filled in. And I can't figure out why. Same happens when I use EVENT directive to text in chars into the input. By the way, on the site where my script is supposed to work the input field is made of editable div.
iMacros for Firefox: 8.9.7
Firefox: 49.0.1
Pale Moon: 27.0.2
OS: Arch Linux, Windows 10

Manage iMacros from your mobile device: https://manage.getbot.ru
User avatar
alex686
 
Posts: 32
Joined: Tue Oct 20, 2015 11:48 pm

Re: Feedback and Issues on EVENT Recording Mode.

by alex686 on Tue Nov 10, 2015 7:40 am

With regards to EVENT mode, I've made some investigation and found out that iMacros does not type in chars into a content editable div which looks like an input field. The provided test script that fills in the iMacros sample form uses input elements which works just fine.

Can anyone confirm that iMacros does not type in chars in an input field made as editable div when Firefox is not focused?
iMacros for Firefox: 8.9.7
Firefox: 49.0.1
Pale Moon: 27.0.2
OS: Arch Linux, Windows 10

Manage iMacros from your mobile device: https://manage.getbot.ru
User avatar
alex686
 
Posts: 32
Joined: Tue Oct 20, 2015 11:48 pm

Re: Feedback and Issues on EVENT Recording Mode.

by Tom, Tech Support on Wed Nov 11, 2015 3:59 am

alex686 wrote:Can anyone confirm that iMacros does not type in chars in an input field made as editable div when Firefox is not focused?
Can you provide a link to a page with such a field, or otherwise provide the source HTML here.
Regards,

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

Re: Feedback and Issues on EVENT Recording Mode.

by alex686 on Wed Nov 11, 2015 11:05 pm

Hi, Tom and thanks for your support.

Here I've attached the whole webpage archive in mht format that was generated by the Mozilla Archive Format, with MHT and Faithful Save addon. I guess you should add it to your Firefox to be able to open the file. I've also attached the macro that leaves a comment under the photo. This macro works only when Firefox is focused. Tested it on two windows computers and on my linux machine.

Please try it yourself.

PS. Could not attached the mht file as it is too big even archived, so I've zipped both mht and iim macro and uploaded it here.
iMacros for Firefox: 8.9.7
Firefox: 49.0.1
Pale Moon: 27.0.2
OS: Arch Linux, Windows 10

Manage iMacros from your mobile device: https://manage.getbot.ru
User avatar
alex686
 
Posts: 32
Joined: Tue Oct 20, 2015 11:48 pm

Re: Feedback and Issues on EVENT Recording Mode.

by Tom, Tech Support on Thu Nov 12, 2015 5:12 am

Thanks for providing the test page and macro Alex! I confirmed that the field is not filled when the browser does not have focus and have logged this for further investigation by the development team. I do not expect any feedback or resolution any time soon, because the team is wrapping up development on iMacros 9 with support for e10s, and then switching over to do some more work on iMacros for Chrome.
Regards,

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

Re: Feedback and Issues on EVENT Recording Mode.

by chivracq on Wed Jul 26, 2017 5:03 pm

chivracq (by chivracq on 06 Aug 2013, 05:34) wrote:- 01 - Object not found on 'MOUSEMOVE'.
The most blocking aspect with the EVENT Record Mode is that when an Object is not found, the Script will hang and there is no way at all to get it resuming its execution...

As I mentioned it earlier...:
[quote=Chivracq (2013/06/20)]
..., there was a Bug in v8.3.0 with the EVENT-Mode when a "EVENT TYPE=MOUSExxx SELECTOR="ID_xx1"" was not found, by jumping to the next instruction and hanging the Macro with no Error at all but with no possibility to resume its execution, now with the latest v8.5.1 Patch, all "EVENT TYPE=MOUSExxx" instructions are skipped together (instead of just only 1) and the Macro hangs at the next instruction.
The final result is still the same, the Macro still hangs if the SELECTOR-Object is not found (with "SET !ERRORIGNORE YES", of course!), but the behaviour is a bit different between v8.3.0 and v8.5.1, so maybe it's worth mentioning it...
(I haven't reported it yet, as I wanted to report all my EVENT-Mode feedback in one apart Thread...)

EDIT (Decb 2016) on this '01' Item:
This very Blocking Bug in my Opinion never got acknowledged by TechSup nor encountered/reported by any other User... :shock: , until finally more than 3 years later in this Thread from Novb/Decb 2016 where I've posted some fairly easy though a bit "Creative" Workaround that I've been using myself since a few months when I finally dared to dig into the "Problematic" again, ah-ah...!

Well, it will have taken exactly 4 years for some other User to finally hit and confirm "my" Bug, ah-ah...!: :shock: 8) :D
- Macro Freezes
(At least if I'm correct, the Content of that other Thread is not very High Quality, at least from the Opening Post in the Thread..., with only some truncated Screenshot of the Script used... :roll: )

My complete Reply in that other Thread:
chivracq wrote:
DeathN wrote:Hi guys.
I'm testing some macros, but every time the pages doesn't, I have same error.
Code: Select all
My firefox is 54.0.1 (64-bit)
iMacros for Firefox 8.9.7


Code: Select all
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 25
SET !TIMEOUT_STEP 3
TAB CLOSEALLOTHERS
SET !LOOP -9999


I don't know what's happening with my macro, I think the erro is caused by FF, but I don't know.
Can someone explain to me??
Obrigado

FCIM...! :mrgreen: (OS is missing...)

I don't really understand what "... but every time the pages doesn't, I have same error." means, it is grammatically and linguistically not correct, especially if you don't mention your "same Error"...!

Hum, much easier if you post your Full Script in plain Tet in your Thread rather than some truncated Screenshot... :roll: ,, oh but yep, youpidoo...!!!, welcome to the Club!, ah-ah...! You are finally the first one to hit a Bug I have already reported 4 years ago, in 2013, ah-ah...! :D

It is related to the 'EVENT' Mode and a 'MOUSEMOVE' on an HTML Element that is not present on the Page, then the Script will simply hang at the next Line, even with '!ERRORIGNORE'..., but hum..., you mention a "same Error", "my" Bug doesn't trigger any Error, the Script simply hangs...

I've finally found a Workaround about 1 year ago now I think, I've already "mentioned" it in some Thread(s), I'm not sure if I've posted the Full Workaround already, you can search the Forum a little bit, or post your Full Script and I can apply/demonstrate my Workaround to your specific Site...

Related Threads:
- Feedback - Take the iMacros Add-on(s) Survey!
=> Item '02'.
- Feedback and Issues on EVENT Recording Mode.
=> Item '01'.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Previous

Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 12 guests

-->