aritzbastida wrote:chivracq wrote:CIM/FCIM...!
I saw some "Chrome" somewhere in your Post, but mention your FCI (read my Sig...) for me to read, sorry...
Hum, and I don't see any URL mentioned, I hope your Qt is generic enough (and gives enough Info/Details) to expect a generic Answer as well...
You are right, the question is generic, but the problem is generic as well, and that's why I wrote the post in the "General Support & Discussions" forum.
I didn't feel that the specific Chrome or iMacros extension version would make any difference, but here are the details:
Code: Select all
* Chrome: 56.0.2924.87
* iMacros: 8.4.4
* OS: Windows 7
As for the URL, that's exactly the point: no explicit URL is involved
in the script. The sequence is:
* I load a URL manually, with the table I mentioned
* I open iMacros extension, and Play the script above in a loop
* The third line triggers a click on a link, which saves the form information and refreshes that URL. It's nos an explicit URL load, but an implicit one.
* Probably because of that, the script won't wait the page to load and will continue to the next iteration in the loop. As the page has not been reloaded yet (still waiting for the HTTP result), for some reason, iMacros finds the TAG commands in the
old page, and thus, the behavior of the script is wrong from this point on.
The URL is in a company's intranet, so I cannot show it for you to reproduce, but if necessary, I can try to reproduce the problem in some public website.
OK, good for FCI..., Required Info for me to read as many Commands are not implemented or behave differently for all Browsers/Versions, even if I always try to find a Solution that will work in all Browsers... FCI not mentioned... => I don't care, I don't read, simple, ah-ah...!
And the 'General' Sub-Forum is the correct Sub-Forum for your Qt, the 'FF' and 'CR' Sub-Forums are meant for Threads specific to only FF or CR, meaning that your Script works on all 3 other Browsers but fails only on FF or CR, or if you use a '.js' Script for FF as well as '.js' Scripts are only supported by iMacros for FF.
Well, your Pb is always specific to some specific URL or some specific Site or Page and iMacros Scripts are always tailored on a specific Site or Page especially when a Script doesn't behave like you would expect it to...
If I understand your Scenario correctly, the 'Save' triggers a Refresh of the Page but the next Loop doesn't wait for the Page to have fully loaded.
One possible Solution for Reliability (but not for Speed) could be to include the 'URL GOTO' at the beginning of your Script to force a "clean" Refresh of the Page (for which iMacros will wait for your '!TIMEOUT_PAGE' (Default) Setting).
As you loop your Script with always 'POS=1' (and not with 'POS={{!OOP}}'), "something" happens on the Page after every 'Save' with the 'OK' Buttons and their corresponding Input Field, either they disappear from the Page or the previous Input 'TEXTAREA' Field is still visible (with no 'OK' Button) and it is probably not of TYPE=TEXTAREA anymore...
=> If that is indeed the case, a possible Solution could be to start your Script by first tagging the "previous" "<SP>Validado" Field at 'POS={{!LOOP}}-1' with a "long" (= 5 sec or 10 sec) Value for '!TIMEOUT_STEP' before the "real" Click on the next 'OK' Button....
And you would exclude that 'POS={{!LOOP}}-1' Check Mechanism from the first Loop with 'EVAL()' or simply with '!ERRORIGNORE' to avoid the 'POS=0'.
Hum, or you could put that Check Mechanism at the end of the Macro after the 'Save' (=> based on 'POS={{!LOOP}}' then, and not on 'POS={{!LOOP}}-1' as you are still in the same Loop, like that you avoid the 'POS=0' Situation for the first Loop...) to make sure the 'Save' went OK before starting the next Loop. And if the Check doesn't go right, you can decide if the Macro will abort "naturally" because of your '!TIMEOUT_STEP' Setting or you could use a "Conditional PROMPT" or trigger a 'MacroError()' with 'EVAL()', or still decide to bypass that Error with '!ERRORIGNORE'...
Well, and if the "Rows" disappear one by one after each 'Save', I would have a few Solutions, but pfff..., that's the Pb with "generic" Solutions if I don't know how the Page behaves, I'll probably be typing that Solution for 1/4h for nothing, or still have to "cover" several Cases, if the Nb of Rows decreases or gets spanned on several Pages and the Nb of Rows remains constant on the first Page until there are less Rows than the Max Nb of Rows that can be displayed on one Page...
=> Describe a bit how your Page/Site "with no specific URL" behaves a bit exactly before I can think of a concrete Solution if that Behaviour is not the one I supposed in the first Solution, ah-ah...!
And yep, if you don't come out by yourself, you can always find some Public Site, but the Solution I will find will probably be tailored to that specific Site and won't work as-is on your own Site... But OK, good luck already with what I posted...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...