Save erases data

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++.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Save erases data

Post by wtuvell » Fri Apr 10, 2015 8:26 pm

I have a use-case where I need to fill in some data into a field on a certain page, then click "Save". This works correctly (the data gets saved) if I click Save manually (using an actual mouse click). But if I do the Save using iMacros, the data disappears (though the Save succeeds otherwise).

See the attached screenshot. The DOM for the Save button in question is exhibited in the F12/DevTools window at the bottom of the screenshot. The word "foo" is the data in question. If I click save manually, "foo" gets saved. But if I execute the iMacros code below, "foo" disappears:
  • FRAME NAME=detail
    TAG POS=1 TYPE=INPUT:SUBMIT ATTR=CLASS:buttonFace&&VALUE:Save
I'm using iMacros v10 in sidebar mode with IE 11 (English) on Win 7 Ultimate. The webserver is my company's product, running on our internal network (hence I can't post a public URL for experimentation).
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Fri Apr 10, 2015 8:51 pm

wtuvell wrote:I have a use-case where I need to fill in some data into a field on a certain page, then click "Save". This works correctly (the data gets saved) if I click Save manually (using an actual mouse click). But if I do the Save using iMacros, the data disappears (though the Save succeeds otherwise).

See the attached screenshot. The DOM for the Save button in question is exhibited in the F12/DevTools window at the bottom of the screenshot. The word "foo" is the data in question. If I click save manually, "foo" gets saved. But if I execute the iMacros code below, "foo" disappears:

Code: Select all

FRAME NAME=detail
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=CLASS:buttonFace&&VALUE:Save
I'm using iMacros v10 in sidebar mode with IE 11 (English) on Win 7 Ultimate. The webserver is my company's product, running on our internal network (hence I can't post a public URL for experimentation).
Screenshot is missing... (And it won't be of much-much Help... More useful would be a Full HTML Saveas of the Page uploaded to the Thread... (You'll need to zip it...)) And post maybe a little bit more of your Script to get the complete Steps to reproduce, especially where this "foo" needs to be entered if it's not obvious... Then your Screenshot could still help...
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Fri Apr 10, 2015 9:53 pm

Hmm, thanks chivracq, I tried to attach the screenshot, but it apparently failed with some sort of resource deficiency problem that I didn't notice (at least, that's the problem I got when I just now retried). So the same problem prevents me from uploading the additional info you kindly request. I'll try again soon, maybe it'll be fixed by then.

(Thanks again!)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Sat Apr 11, 2015 5:18 pm

You can only upload Images to the Forum (.JPG, .BMP, .PNG. etc...) and .ZIP Files and the Max-Size is 256Kb...
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Sun Apr 12, 2015 5:34 pm

Hmm, maybe I'm still doing something wrong? I clicked into this Post Reply mode, went to Upload Attachment, browsed to my screenshot (a 71 KB PNG), hit Add The File, but I keep geting the error msg: "Sorry, the board attachment quota has been reached". Do I have to do something to get myself a bigger quota, or what? [I'm a newbie here, so be gentle (as you have been so far).]
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Mon Apr 13, 2015 12:14 pm

wtuvell wrote:Hmm, maybe I'm still doing something wrong? I clicked into this Post Reply mode, went to Upload Attachment, browsed to my screenshot (a 71 KB PNG), hit Add The File, but I keep geting the error msg: "Sorry, the board attachment quota has been reached". Do I have to do something to get myself a bigger quota, or what? [I'm a newbie here, so be gentle (as you have been so far).]
Hum..., no you can't get "a bigger quota", the Max-Size is 256Kb, but hum, normally the Error Msg is clear about that Limit, I don't remember even seeing your exact Error Msg... I'm trying to upload some Attachment to my Post... (Irrelevant File...)

EDIT (Th.16/04/2015, 13h): The forum Quota Pb is now solved, so I removed the "Fake" .ZIP File I had uploaded for a Test, and I've managed to upload the Screenshot in some later Post below in this Thread...
Last edited by chivracq on Thu Apr 16, 2015 11:26 am, edited 1 time in total.
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Mon Apr 13, 2015 2:47 pm

OK, the upload succeeded for you (I checked, the contents are real). And, I did quote the error msg I got, verbatim. So at this point I'll approach a site admin, maybe they have some wisdom for me. BTW, I'm using Firefox on Fedora (all latest and patched), how about you?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Mon Apr 13, 2015 4:06 pm

wtuvell wrote:OK, the upload succeeded for you (I checked, the contents are real). And, I did quote the error msg I got, verbatim. So at this point I'll approach a site admin, maybe they have some wisdom for me. BTW, I'm using Firefox on Fedora (all latest and patched), how about you?
Pale Moon v24.6.2 (=FF31) on Win7-x64. (and iMacros for FF v8.8.2).

You can send me the File directly per Mail if you want ([My_Pseudo_on_the_Forum]@gmail.com) and I'll (try to) upload it to your Thread...
(If you do so, mention it in your Thread, because I check the Forum more often than my Mail...! :oops: )

Hum, and "latest" FF doesn't mean much, you always have 3 or 4 "latest" FF Versions, currently FF36 + FF37 + FF38 + FF39...
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Mon Apr 13, 2015 4:38 pm

Done: email sent to your gmail. I tried finding a way to complain about "attachment quotas" to a site admin, but it wasn't obvious how to do that.

Sorry about "latest". What I was referring to was "latest" Fedora, together with updates from the Fedora repo. It's FF 37.0.1. I should have realized there could be multiple definitions of "latest" for browser-related technology experts, except that I'm not a member of that crowd, sigh ...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Mon Apr 13, 2015 11:02 pm

OK, I received your Mail with the 3 Attachments, I'll upload your Screenshot and post the relevant part of your Macro for your Pb, but the .ZIP File of the Full HTML Saveas of the Page is too big (1.2Mb and the Max-Size of an Attachment is 256Kb), I could split it into several Attachments as some .js Scripts in it are strangely repeated 3 or 4 times (very bad Design in my opinion) but it looks like I didn't really managed to open the Page a bit correctly in any Browser (Pale Moon v24, FF36, IE10) as all the HTML Content seems to be generated on the fly from some inner .js Scripts, so instead of a "Full HTML Saveas", you could try to save the Page as "HTML Only Saveas" (and check maybe on some Laptop not connected to your Company Network if you can open it a bit correctly, even if from the Source Code, I may be able to recreate a "decent" HTML Page) and try to upload it to the Forum or send it to me again per Mail...

Code: Select all

'...

' Start with 1 tab.
TAB T=1

' Set iMacros system vars.
SET !TIMEOUT_PAGE                300
SET !TIMEOUT_STEP                300
SET !TIMEOUT_DOWNLOAD            600
SET !TIMEOUT_MACRO               999999
SET !WAITPAGECOMPLETE            NO
SET !FAIL_ON_ALL_NAVIGATEERRORS  NO
SET !REPLAYSPEED                 FAST
SET !ERRORIGNORE                 NO

' Set iMacros user vars.
SET theIPADDR                    172.16.51.23
SET theDELAY                     0

' NOTE: For our purposes (OneSign Admin), our default/only FRAME (for
' TAG directives) is "detail".  But FRAME can't just be set once-for-all,
' it must be repeated before every TAG directive.  (Sigh.)
'FRAME NAME=detail

'...


' Fill in Citrix XenApp Svr & App.
FRAME NAME=detail
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:tblFieldInputLong&&ONCHANGE:setXenAppConnectionServer* CONTENT={{aXENAPPSVR}}
WAIT SECONDS={{theDELAY}}
' Gotta do a weird Add/Remove dance here?
'FRAME NAME=detail
'TAG POS=1 TYPE=A ATTR=ONCLICK:addXenAppApplication*&&TXT:Add
'WAIT SECONDS={{theDELAY}}
FRAME NAME=detail
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:XenApplication&&ONCHANGE:setXenAppApplicationName* CONTENT={{aXENPUBAPP}}
WAIT SECONDS={{theDELAY}}
FRAME NAME=detail
TAG POS=1 TYPE=SELECT ATTR=NAME:XenAppLogonMode CONTENT=$Imprivata<SP>user<SP>credentials
WAIT SECONDS={{theDELAY}}
'FRAME NAME=detail
'TAG POS=2 TYPE=A ATTR=ONCLICK:removeXenAppApplication*&&TXT:Remove
'WAIT SECONDS={{theDELAY}}
' Check Allow authentication from XenApp-enabled devices (ON).
FRAME NAME=detail
TAG POS=1 TYPE=LABEL ATTR=FOR:vmWareViewEnable&&TXT:Allow<SP>authentication<SP>from<SP>XenApp-enabled<SP>devices
' BUG IN DOM HERE!  ID=vmWareViewEnable&&ONCLICK:setAppEnabled
' is duplicate of VMware APP section; so must use POS=2 here
FRAME NAME=detail
TAG POS=2 TYPE=INPUT:CHECKBOX ATTR=ID:vmWareViewEnable&&ONCLICK:setAppEnabled* CONTENT=YES
WAIT SECONDS={{theDELAY}}

' Weirdly (bug in page?), something during this workflow breaks an earlier
' setting, so let's go back and fix that now:
' Click Allow authentication from VMware View clients (ON).
FRAME NAME=detail
TAG POS=1 TYPE=LABEL ATTR=FOR:vmWareViewEnable&&TXT:Allow<SP>authentication<SP>from<SP>VMware<SP>View<SP>clients
FRAME NAME=detail
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:vmWareViewEnable&&ONCLICK:setVMwareViewEnabled* CONTENT=YES
WAIT SECONDS={{theDELAY}}

' Click Save.
FRAME NAME=detail
'TAG POS=1 TYPE=INPUT:SUBMIT ATTR=CLASS:buttonFace&&VALUE:Save
TAG POS=1 TYPE=INPUT ATTR=CLASS:buttonFace&&VALUE:Save
WAIT SECONDS={{theDELAY}}
' Check
FRAME NAME=detail
TAG POS=1 TYPE=TD ATTR=CLASS:infoText&&TXT:Properties<SP>are<SP>saved
WAIT SECONDS={{theDELAY}}

' That should have worked, but it doesn't: the VMware and Citrix pub apps
' don't "stick" (i.e., they disappear).  So let's go back and re-add them:

' Re-fill in VMWare App.
FRAME NAME=detail
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:VMwareApplication&&ID:vmwareappApplication1&&ONCHANGE:setVMwareAppApplicationName* CONTENT={{aVIEWAPP}}
WAIT SECONDS={{theDELAY}}
' Re-fill in Citrix XenApp App.
FRAME NAME=detail
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:XenApplication&&ONCHANGE:setXenAppApplicationName* CONTENT={{aXENPUBAPP}}
WAIT SECONDS={{theDELAY}}
' Re-Save.
FRAME NAME=detail
'TAG POS=1 TYPE=INPUT:SUBMIT ATTR=CLASS:buttonFace&&VALUE:Save
TAG POS=1 TYPE=INPUT ATTR=CLASS:buttonFace&&VALUE:Save
WAIT SECONDS={{theDELAY}}
' Check
FRAME NAME=detail
TAG POS=1 TYPE=TD ATTR=CLASS:infoText&&TXT:Properties<SP>are<SP>saved
WAIT SECONDS={{theDELAY}}
But hum..., I get your Error Msg as well when I try to upload your Screenshot to the Thread, both as .JPG (72Kb) and as .ZIP (69Kb) File... Weird indeed...!
Sorry, the board attachment quota has been reached.
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Tue Apr 14, 2015 3:02 pm

I'm emailing you the SaveAs HTML only, but I'm afraid there's not much to it.

I can open the page either (HTML Only or Complete). Note that the page is behind a password-protected account, and the server serves IE only (it rejects if User Agent != IE).

If we're stuck for technical reasons with the iMacros source only, as given by the screenshot I sent (including snippet of DOM, but not deeper page info), is there anything that stands out as an obvious bug?

Note that one thing I haven't tried yet (will do so today) is DS CMD=CLICK, because I try to avoid that like the plague, but if it work I might be stuck with it?

Or, do you think the code as it stands "should" work? In which case, would you suspect a bug in the page, or in iMacros?

Cheers (and thanks again).
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Tue Apr 14, 2015 3:03 pm

Oops, I meant to say I CAN'T open the page either!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Save erases data

Post by chivracq » Tue Apr 14, 2015 4:01 pm

You can still edit your previous Posts if you want to modify the "can" into "can't"...

Yep, no Difference with the HTML Only Saveas, same Source Code, there is no HTML in it, only References to .XML Files which didn't/don't get included in any of the 2 Saveas...

Yep I had seen the IE9 thing, that's why I had tried to open it in IE10 as well, I had not tried changing my UA, I did so right now in PM to IE10 and IE9, no difference... And I had checked all (HTML) Files included in the whole Saveas from yesterday...

But, indeed about DS Mode, that's stg I wanted to mention yesterday, because the HTML Content looks like it is generated on the fly to me, that makes Pages that iMacros has trouble to handle using any of the Standard Mode but that the EVENT Mode on FF can handle, and the Equivalent for the iMacros Browser would be the DS Mode...

From looking at your whole Script, I didn't see anything strange (I only had Compliments on the Quality of the Coding, with Comments, etc...), but I cannot judge on what got recorded if I cannot play with the Page myself..., except 2 minor things:
- I was surprised indeed by the continuous repetition of the Frame Name, you normally have to re-specify the Frame Number or Frame Name only when you switch between Frames... :?
- And I was surprised as well that you used this Syntax:

Code: Select all

' Go to home/landing page.
URL GOTO=javascript:top.detail.document.location.href("https://{{theIPADDR}}/sso/landing-page.html")
..., I would have expected this simpler Syntax:

Code: Select all

' Go to home/landing page.
URL GOTO=https://{{theIPADDR}}/sso/landing-page.html
But hum..., one more Idea..., on FF, using 'Web Developer' / 'Firebug', there is somewhere an Option where you can see/save the 'Generated HTML Source Code (for each Frame)' or stg like that..., you might have some similar Option in your 'DevTools'... :idea:

>>>

And I've logged an Issue about the Attachment Upload Problem:
- Forum Quota reached for Attachments.

EDIT (Th.16/04/2015, 13h): The forum Quota Pb is supposed to be solved now, so I'll try to add the Screenshot... and yep, it looks like it's working now...!
Attachments
Screenshot.png
Last edited by chivracq on Thu Apr 16, 2015 11:17 am, edited 1 time in total.
- (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...
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Tue Apr 14, 2015 8:49 pm

Nope, nothing works. Per our conjecture, I tried the DS workaround in 2 ways, but neither one works (the Save "happens" in the sense that the "successful Save" page is reached, but the data doesn't "stick"):

Code: Select all

TAG POS=1 TYPE=INPUT ATTR=CLASS:buttonFace&&VALUE:Save EXTRACT=VALUE
DS CMD=MOVETO X={{!TAGX}} Y={{!TAGY}}

Code: Select all

URL GOTO=javascript:top.detail.scrollTo(0,10000)
DS CMD=CLICK X=430 Y=502
As we've discussed (in email), I'm not responsible for this website (it's our server's "Admin", i.e, "Administrative GUI"), I'm just a performance engineer tasked with characterizing the server's performance. As it turns out, the Admin does everything in frame "detail", but things definitely break (freeze) if I don't repeat the FRAME cmd every so often, and I don't know what the "rule" is, so I over-kill and do the FRAME cmd all the time. Similarly, the javascript:top.detail nonsense is absolutely required (fails/freezes every time otherwise).

So I think the conclusion is that iMacros just can't do this at the present time. I'll approach our Admin devs, maybe they have some ideas. I'd sure like to get an iMacros dev in here (behind the security firewall) to take a look. And as it turns out, I may be able to do that, because I just happen to be in Lexington, MA, U.S.A., only a mile from the Ipswitch mother-ship!

Yes, I see the Edit button now, not all forums have it, but I should've checked closer. (Haste makes waste.)

Finally, thx for the Attachment Quota complaint. Especially the reference to floppies!

Cheers, chivracq, until next time, you've been great!
wtuvell
Posts: 13
Joined: Fri Apr 10, 2015 7:49 pm

Re: Save erases data

Post by wtuvell » Tue Apr 14, 2015 9:46 pm

Hey, so here's another piece of "evidence". I tried to "cheat", via the following code block, but EVEN IT DOESN'T WORK! Any ideas??

Code: Select all

' NOPE, DAMMIT, NOTHING WORKS!  The Save doesn't "stick" in iMacros!
' So we cheat: We put up a dialog box and force the user to click Save!  Sigh ...
PROMPT "Please dismiss this dialog box, then click the Save button, then Continue iMacros.  (Sigh ...)"
PAUSE
Post Reply