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++.

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.

Save erases data

by wtuvell on Fri Apr 10, 2015 1: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).
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Fri Apr 10, 2015 1: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)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: Save erases data

by wtuvell on Fri Apr 10, 2015 2: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!)
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Sat Apr 11, 2015 10:18 am

You can only upload Images to the Forum (.JPG, .BMP, .PNG. etc...) and .ZIP Files and the Max-Size is 256Kb...
- (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: Save erases data

by wtuvell on Sun Apr 12, 2015 10:34 am

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).]
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Mon Apr 13, 2015 5:14 am

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 4:26 am, edited 1 time in total.
- (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: Save erases data

by wtuvell on Mon Apr 13, 2015 7:47 am

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?
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Mon Apr 13, 2015 9:06 am

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)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: Save erases data

by wtuvell on Mon Apr 13, 2015 9:38 am

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 ...
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Mon Apr 13, 2015 4: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)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: Save erases data

by wtuvell on Tue Apr 14, 2015 8:02 am

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 12:49 pm

Re: Save erases data

by wtuvell on Tue Apr 14, 2015 8:03 am

Oops, I meant to say I CAN'T open the page either!
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Re: Save erases data

by chivracq on Tue Apr 14, 2015 9:01 am

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 4:17 am, edited 1 time in total.
- (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: Save erases data

by wtuvell on Tue Apr 14, 2015 1: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 12:49 pm

Re: Save erases data

by wtuvell on Tue Apr 14, 2015 2: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
wtuvell
 
Posts: 13
Joined: Fri Apr 10, 2015 12:49 pm

Next

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest

-->