Thrilling wrote: ↑Wed Jan 09, 2019 8:09 am
Hi Chivracq, as always, thank you for helping, you're a lifesaver
Problem 2:
The Timeout_Step command seems to work just fine, thank you very much
Problem 1:
After executing this:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}
SET !VAR1 EVAL("var x='{{!COL16}}'; var z; if((x=='RETIRED')||(x=='HOUSEWIFE')||(x=='UNEMPLOYED')||(x=='PUPIL')||(x=='STUDENT')||(x=='HOUSEMAN')){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 20
-------------------
After executing this:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Russland.csv
SET !ERRORIGNORE YES
SET !DATASOURCE_LINE 36
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Place_TextBox CONTENT={{!Col14}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_HomeAddress_Phone_TextBox CONTENT={{!Col15}}
SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"
SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")
PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
Set !TIMEOUT_STEP 0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Condition_List CONTENT=%{{!var1}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_OrgName_TextBox CONTENT={{!Col17}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Position_TextBox CONTENT={{!Col16}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Address_TextBox CONTENT={{!Col18}}
TAG POS={{!var1}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Occupation_Phone_TextBox CONTENT={{!Col19}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Children_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMFinishStep_Relatives_Condition_List CONTENT=%0
I get this:
COL16: _RETIRED_ VAR1: __
and then this error message:
BadParameter: expected POS=<number> or POS=R<number>where <number> is a non-zero integer as parameter 1, line: 21
And not mentioned, but I take for "granted" that you are using the 'PE' Version for v10.0.5 for CR, and that you've installed the 'FIO' Module needed for using a DataSource...
I have that Module installed that allows using DataSources, and it's inputting data successfully. I'm not sure what the "PE" version is, an IT guy of my firm prepared this windows 7 OS and installed the imacros for chrome for me to be used in the future. When looking at the chrome extensions installed, and selecting "details" on the imacros extension, it says "version 10.0.5". When recording a macro with this version, the first line is
Yeah, sorry-sorry, I had seen your Reply 2 days ago and I saw you checking the Forum a few times since, but pfff, not easy to debug your Script "remotely" as I don't have the URL nor the same FCI like yours nor your DataSource, and I was a bit "busy' in the last 2 days, but OK, some mini-Update..., here is a Script to help you debug your Pb:
(I modified a bit the/"my" 'EVAL()' to make it even easier to debug more thoroughly and for each part/Var in it..., as I don't understand why '!VAR1' returns an empty String ("__") in the 'PROMPT'...)
Code: Select all
SET Occupations_0 "RETIRED,HOUSEWIFE,UNEMPLOYED,PUPIL,STUDENT,HOUSEMAN"
SET !VAR0 "HOUSEWOMAN"
'SET !VAR0 {{!COL16}}
'SET !VAR1 EVAL("var x='{{!COL16}}', ocp='{{Occupations_0}}'; var y,z; y=ocp.split(x); if(y.length>1){z=0;} else{z=1;}; z;")
'SET !VAR1 EVAL("var c='{{!COL16}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
SET !VAR1 EVAL("var c='{{!VAR0}}', ocp='{{Occupations_0}}'; var x,y,z; x=ocp.split(c); y=x.length; if(y>1){z=0;} else{z=1;}; z;")
'PROMPT COL16:<SP>_{{!COL16}}_<BR>VAR1:<SP>_{{!VAR1}}_
PROMPT VAR0:<SP>_{{!VAR0}}_<BR>VAR1:<SP>_{{!VAR1}}_
=> (1) You first need to test with that hard-coded '!VAR0' => "HOUSE[WO]MAN" + "RETIRED" + "XETIRED" (Deliberate Typo, to trigger the "z=1", same with "HOUSEWOMAN"), then in the 'EVAL()', return => 'z' + 'y' + 'x' + 'ocp' + 'c', one by one, (by changing the Return Var at the end of the 'EVAL()'). (This is as far I can test myself, and that part works for me... (on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x84).)
(2) Then check again for all 5 Vars with 'SET !VAR0 '{{!COL16}}' (to pull the Data from your '.CSV'), and especially if 'c' returns "__undefined__".
(3) Then try also with \" instead of the Single Quotes around '{{!COL16}}' or '{{!VAR0}}' though it shouldn't play a role with '{{!VAR0}}' as the "Link" with '{{!COL16}}' has already been defined "before"..., but depending on how your Data is stored in your '.CSV', with Single/Double Quotes, that could play a Role for the 'EVAL()'...
OK, I hope you understand what I mean, takes me 2 min to test all different Cases if I have "access" to everything, but like I said, I miss too many Parameters that I don't control in your Case..., so you need to understand the Debug-Process and do the Debug yourself...
And you might find out that there is a Bug, very possible..., but hum..., I never stop there, I always try to find a Workaround...
=> Reason actually why I came to the Forum 6 years ago, first time I had a "real" Bug and couldn't find a Workaround (I had already been using iMacros for a few years then), to report that Bug, "my" Bug never ever/even got acknowledged ah-ah...!, is still there (well, except in v10.0.2 for FF as it was/is related to the 'EVENT' Mode which is not implemented anymore in that Version for FF, ah-ah...!), but I finally found a (stupidly very simple!) Workaround about 2 years ago, but OK, 6 years ago, I had a look at the Forum and was surprised I knew how to answer/solve maybe 80% of all Qt's on the Forum, and 6 years later, I'm still here, now my "80%" is maybe "95%" ah-ah...! (Hum, even if that "Rate" is maybe going down again, as I don't use any of the v10.x 'Free'/'PE' Versions myself..., which often seem to "behave" differently from the previous Versions...)
And like I said, even if there is a Bug, yeah...!, that's not the end, try to find a Workaround, this is how I "work", I used to "destroy" Software and Web-Sites for a Living, but always finding Workarounds for my Findings then again new Way(s) to void again my Workaround(s) until it would get so cumbersome that nobody on this Earth could have gone the same "Thinking-Path" (well, happened a few times though, ah-ah...!, I'm not always "the Best", ah-ah...!), a bit like if I had been playing Chess with myself, playing both White + Black, and each time being "completely" White, then "completely" Black on each turn...
But hum, if you find out there is really a Bug, Dev is actually working on a new Release (=> v10.0.6 I guess), related to some other (very recent) Thread on the CR Sub-Forum, a Fix for this current Thread could maybe be included in that same Release, but you'll need to be very "precise" in your Testing/Debugging or to provide some reproducible Testcase/Script for TechSup to be able to reproduce your Pb...
But hum, like I said, it's "better" not to care (too much) about Bugs, and rather try to find Workarounds, ah-ah...!
Yeah, to be honest, I never really care about Bugs and Limitations, I always (try to) find a "Workaround"...!
- (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...