Checkbox is being toggled not ticked...?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
supersimon7
Posts: 2
Joined: Thu May 10, 2007 1:25 am
Contact:

Checkbox is being toggled not ticked...?

Post by supersimon7 » Thu May 10, 2007 1:34 am

I'm running this script...
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:edit ATTR=NAME:access_grants[]&&VALUE:101 CONTENT=yes

On pages where the textbox is ticked it's being unticked, and when it's unticked it's being ticked. How can I ensure it always gets ticked...?

Using Firefox extension 0.8.0.1. Is this a bug? Or am I just a noob?

< Simon >
supersimon7
Posts: 2
Joined: Thu May 10, 2007 1:25 am
Contact:

Post by supersimon7 » Thu May 10, 2007 1:37 am

OK, perhaps you need the URL GOTO= bit prior to ensure iMacros knows the value? Would that be it?
Hannes, Tech Support

Post by Hannes, Tech Support » Thu May 10, 2007 2:19 pm

Hello,

there is no simple way to solve this problem. However here are three approaches to work around this issue:

1) The site may read the checkboxes' states from a cookie. Deleting it might set the checkbox to a determinate state
2) Use the Scripting Interface to extract the relevant part of the code and have a script check the state and "decide" what to do.
3) Use the windows version's image recognition abilities with a script as in approach 2. (cf. http://wiki.imacros.net/Image_Recognition)


Hannes
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Post by mknoll1 » Thu May 10, 2007 6:10 pm

I don't see why this should be an issue. In the Imacros browser the command determines the final state not whether to check the box or not. I tested with this page saved to c:\testpage.html:

<html>
<head>
<title>My Page</title>
</head>
<body>
<form name="myform" action="http://www.mydomain.com/myformhandler.cgi" method="POST">
<div align="center"><br>
<input type="checkbox" name="option1" value="Milk"> Milk<br>
<input type="checkbox" name="option2" value="Butter" checked> Butter<br>
<input type="checkbox" name="option3" value="Cheese"> Cheese<br>
<br>
</div>
</form>
</body>
</html>

and this script:

VERSION BUILD=4250510
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=file:///C:/testpage.html
SIZE X=801 Y=602
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option1&&VALUE:Milk CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option2&&VALUE:Butter CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option3&&VALUE:Cheese CONTENT=YES

and everything worked fine.

When the page loads Butter is checked but the script rolls through it leaving it checked at the end.

I then tested it in the firefox borwser and got a different result with the code below:

VERSION BUILD=6000502 RECORDER=FX
TAB T=1
URL GOTO=file:///c:/testpage.html
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option1&&VALUE: CONTENT=true
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option2&&VALUE: CONTENT=true
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:myform ATTR=NAME:option3&&VALUE: CONTENT=true

Why does it work differently in Fire Fox?
Post Reply