I'm currently at a dead-point with a form automation where I have to submit a simple XML file to Swiss Customs Agency for goods importing and VAT declaration.
This is the page URL: https://e-dec-web.ezv.admin.ch/webdec/main.xhtml
I have to click the third button (with a folder icon) so that an IFRAME pops-up asking me to choose a local file to submit... and this is exactly where I'm getting crazy trying to make things work.
Code: Select all
SET !REPLAYSPEED MEDIUM
TAG POS=1 TYPE=INPUT:FILE FORM=ID:fileUploadForm ATTR=NAME:upload&&CLASS:iceInpFileTxt&&TYPE:file CONTENT=>>>>>MYPATH\MYFILE.XML<<<<<
TAG POS=1 TYPE=DIV ATTR=CLASS:impex-cmd-none-image-wrapper&&TXT:OK
This code seems to work just like when I manually select the file but... surprise surprise... submitting this form with iMacros leads to a "file couldn't be uploaded"
Really hope someone has a nice idea to solve this bad & tricky puzzle!!
Oh, and for the sake of completeness (and to prevent chivracq from kicking my butt
FCI: iMacros for FF 8.9.7, Firefox x64 53.0 (multiprocess disabled), Windows 10 x64 (1703 build 15063.250)
Hum, seems to work for me, try this Script:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !TIMEOUT_PAGE 30
SET !TIMEOUT_STEP 5
TAG POS=1 TYPE=DIV ATTR=TXT:Zollanmeldung<SP>laden
TAG POS=1 TYPE=INPUT:FILE FORM=ID:fileUploadForm ATTR=NAME:upload CONTENT=<<...>>
TAG POS=1 TYPE=PRE ATTR=TXT:*.xml
TAG POS=1 TYPE=DIV ATTR=TXT:OK
(Tested on iMacros for FF v8.8.2, PM v26.3.3 (=FF47), Win10-x64.)
I actually do get the Error Msg (in German) as well, but I guess that's because I don't have a "legit" '.xml' File to upload, I did my "Testing" using some "fake" '.txt' File...
Hum, and stupid Qt/Remark I hope..., make sure you are "really" using v8.9.7 and that your Browser didn't update itself to v9.0.3 as File Upload is not supported anymore in v9.0.3...
"(and to prevent chivracq from kicking my butt
=> Ah-ah...!, I don't do "Butt Kicking", ah-ah...!, only "Spanking", oops...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...