Checkboxes

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
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
Post Reply
shaves
Posts: 77
Joined: Tue Apr 29, 2008 6:50 pm

Checkboxes

Post by shaves » Wed Sep 17, 2008 7:54 pm

When I get to a specific web page, there are 5 checkboxes. 2 already have the checkmark in them (open / open pre-write) and the other 3 do not (void / closed / close pend ). I want to "deselect" one of the checkboxes (open pre-write) with a checkmark. I am trying the code below without any success.

MyMacroCode = "CODE:"
MyMacroCode = MyMacroCode + "VERSION BUILD=6140505" + vbNewLine
' MyMacroCode = MyMacroCode + "SET !ERRORIGNORE YES" + vbNewLine
MyMacroCode = MyMacroCode + "TAB T=1" + vbNewLine
MyMacroCode = MyMacroCode + "TAB CLOSEALLOTHERS" + vbNewLine
MyMacroCode = MyMacroCode + "FRAME F=8" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:pageForm ATTR=NAME:openPreWrite&&VALUE: CONTENT=NO" + vbNewLine

If I manually select the "void" checkbox (it is not selected), the 2 checkboxes (open / open pre-write) are automatically deselected. I have also tried the following code to (1) select the "void" checkbox, (2) un-select the "void" checkbox, and then select only the "open" checkbox. However, I'n not getting the results that I want with this either.

MyMacroCode = "CODE:"
MyMacroCode = MyMacroCode + "VERSION BUILD=6140505" + vbNewLine
' MyMacroCode = MyMacroCode + "SET !ERRORIGNORE YES" + vbNewLine
MyMacroCode = MyMacroCode + "TAB T=1" + vbNewLine
MyMacroCode = MyMacroCode + "TAB CLOSEALLOTHERS" + vbNewLine
MyMacroCode = MyMacroCode + "FRAME F=8" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:pageForm ATTR=NAME:openVoid&&VALUE: CONTENT=YES"
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:pageForm ATTR=NAME:openVoid&&VALUE: CONTENT=NO"
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:pageForm ATTR=NAME:open&&VALUE: CONTENT=YES
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:pageForm ATTR=NAME:openPreWrite&&VALUE: CONTENT=NO" + vbNewLine

We are on Version 6.14. Also as a general question, do I need to have the "version build" line in this code?

Thanks for your help.......
BrianR
Posts: 126
Joined: Wed Jun 11, 2008 4:13 pm

Re: Checkboxes

Post by BrianR » Wed Sep 17, 2008 8:10 pm

I usually grab the name of the checkbox (Using a wild card) See Below..


TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:option2*
shaves
Posts: 77
Joined: Tue Apr 29, 2008 6:50 pm

Re: Checkboxes (resolved)

Post by shaves » Wed Sep 17, 2008 8:38 pm

Thanks.....for the help....I removed "&&Value" and it works like I want it to....
Post Reply