Awaiting you to mention/add your FCI to your OP, and you've seen my Reply, shouldn't be "too difficult" to mention 3 Versions, I would think...!
, and hum, 2 Versions for you actually, if I'm correct about iMB, + 'Pro'/'Enterprise'/'Trial'.
=> 'Enterprise' I reckon, as you were using '.vbs' Scripts, from your
previous Thread, but if a '.vbs' Script is "involved" in this Thread, then I would also need the 'SI' Version ('Scripting Interface'), but it should/will "normally" be the same like the iMB Version...
>>>
But anyway, I already had a Look at your "Scenario" and already did some Testing...
No URL posted, so I used the Forum phpBB 'ucp' Page, => from the 'Board preferences' Tab + 'Edit global settings' Sub-Tab (
direct Link), which contains several RB's, => on the "Users can contact me by email:" RB for example, which contains 2 Options with Values="1"/"0" (="Yes"/"No").
HTML Source of that RB:
Code: Select all
<dl>
<dt><label for="viewemail0">Users can contact me by email:</label></dt>
<dd>
<label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1" checked="checked" /> Yes</label>
<label for="viewemail0"><input type="radio" name="viewemail" id="viewemail0" value="0" /> No</label>
</dd>
</dl>
FCI (still) not mentioned, so I did all my Testing using:
Code: Select all
iMacros for FF v8.8.2, PM v26.3.3, Win10_Pro.
(I don't have any Version(s) of iMB anyway...)
And to select/toggle this 'Email' RB, ("my" Version of) iMacros will record:
Code: Select all
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=ID:viewemail0
... And the Select is done on "ID:viewemail0" (="No"="0") or "ID:viewemail1" (="Yes"="1") as both Options within the RB have different ID's.
=> I can modify that recorded Line to also use the 'VALUE' Attribute like you are doing...:
Code: Select all
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:1
...
And that works...!, => using "0"/"1" to toggle the RB.
Works also if I enclose the Value between Double Quotes like in:
Code: Select all
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:"1"
Then "everything" I try using a Var instead of hard-coding the Value in the 'TAG' Statement works...!:
Code: Select all
SET Woody 0
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:{{Woody}}
Works also:
Code: Select all
SET Woody "0"
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:{{Woody}}
Works also:
Code: Select all
SET Woody 0
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:"{{Woody}}"
And works also:
Code: Select all
SET Woody "0"
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:"{{Woody}}"
>
If I try to use an "invalid" Value, like "2" for example, then I get some Runtime Error:
Code: Select all
RuntimeError: element INPUT specified by NAME:viewemail&&VALUE:{{Woody}} was not found, line 11 (Error code: -921)
... which was to be expected indeed...
But even if I don't declare the 'Woody' Var, and still try to use it, the 'PROMPT' will display the expected "__undefined__", and the 'TAG' Line will still trigger the "element not found" Runtime Error:
Code: Select all
'SET Woody 0 // Line commented out, => not executed...
PROMPT {{Woody}}
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:{{Woody}}
=> I never get "your" Runtime Error about "Attribute VALUE: is empty.".
Oh...!, wait...!, I haven't tried this one yet:
Code: Select all
SET Woody ""
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:ucp ATTR=NAME:viewemail&&VALUE:{{Woody}}
=> Nope..., I also get the "element not found" Error...
One mini-Bit I couldn't test, is if Case Sensitivity might play a Role, as the Page I'm using for my Tests is using "1"/"0" (= Numbers) for the Values, while you are using "Yes"/"No" (= Strings) in your Scenario/Implementation, + possible "Discrepancy" between "yes/no" <> "Yes/No", but I don't think that would play a Role, I think iMacros at Runtime is Case Insensitive for the 'ATTR' Param and different Attributes, I've already tested that "once", and I think I even use it myself in one of my Scripts... (But I've never tested that on a RB though...)
But anyway, even if it did, you would then get some "element not found" Error and not your "empty VALUE" one...!
>
Then..., I "don't know"...
, maybe "your" Version of iMacros/iMB behaves differently than mine, + you would need to post "a bit more Info" about your whole Script, and how you declare that 'Woody' Var, especially because of your "Woody is a variable that is com[m]ing from my .csv file." Sentence which sounds a bit "strange" to me anyway..., because retrieving some Value from a '.CSV' DataSource is done using '{{!COLn}}', using some extra Var like you are doing is already a bit "cumbersome"...
But I would need to see the whole "Workflow" of your Script..., and if a '.vbs' Script is involved, then also how you retrieve that Content from the '.CSV' File, to then use it in the Declaration for your 'Woody' Var, in the '.vbs' or in the (on-the-fly) '.iim' Script, how you eventually pass it to some separate '.iim' Script (using 'iimSet()'), etc...
+ Your Sentence " When I try to put the Variable {{Woody}} into a text box then it shows the correct value (Yes/No)." is also not "completely clear" to me, if you used some 'PROMPT' Command in (one? of) the '.iim' Script(s), or if you triggered it from some "higher Level" from the '.vbs' Script itself, and where between the different '.iim' Scripts...
- (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...