Jump to content
Sign in to follow this  
Pachan

select check box options in the web page

Recommended Posts

Pachan

Hi Team,

I wanted to select check box "Section 508" of options in the web page and deselect all other check box option. The code I have pasted bellow is not work. Can you please help me.

;*************Code************************

#include <IE.au3>

$AccesbilitityToolWebsite = "http://achecker.ca/checker/index.php"

$VisibilityFlag = 1 ; 0 = Invisible mode, 1 = visible mode

$oIE = _IECreate ($AccesbilitityToolWebsite,0,$VisibilityFlag,1)

$oForm = _IEFormGetObjByName ($oIE, "input_form")

_IEFormElementCheckboxSelect ($oForm, 'gid_1' , "", 0, "byValue" ) ; deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_2", "", 1, "byValue") ;select Section 508

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_3", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_4", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_5", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_6", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_7", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_8", "", 0, "byValue"); deselect if selected

Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_8", "", 0, "byValue"); deselect if selected

Sleep(1000)

;***********code Ends*************

Thanks,

Prakash

Share this post


Link to post
Share on other sites
notsure

I can't see any checkboxes on that website.

--> IE.au3 V2.4-0 Warning from function _IEFormElementCheckboxSelect, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Warning from function _IEFormElementCheckboxSelect, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Warning from function _IEFormElementCheckboxSelect, $_IEStatus_NoMatch

Also use the [ autoit ] [/ autoit ] tags to show your code please.

;*************Code************************
#include <IE.au3>

$AccesbilitityToolWebsite = "http://achecker.ca/checker/index.php"
$VisibilityFlag = 1 ; 0 = Invisible mode, 1 = visible mode
$oIE = _IECreate ($AccesbilitityToolWebsite,0,$VisibilityFlag,1)
$oForm = _IEFormGetObjByName ($oIE, "input_form")

_IEFormElementCheckboxSelect ($oForm, 'gid_1' , "", 0, "byValue" ) ; deselect if selected
Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_2", "", 1, "byValue") ;select Section 508
Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "gid_3", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_4", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_5", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_6", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_7", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_8", "", 0, "byValue"); deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "gid_8", "", 0, "byValue"); deselect if selected
Sleep(1000)

;***********code Ends*************

Share this post


Link to post
Share on other sites
jfcby

This should work for you...

;*************Code************************
#include <IE.au3>

$AccesbilitityToolWebsite = "http://achecker.ca/checker/index.php"
$VisibilityFlag = 1 ; 0 = Invisible mode, 1 = visible mode
$oIE = _IECreate ($AccesbilitityToolWebsite,0,$VisibilityFlag,1)
$oForm = _IEFormGetObjByName ($oIE, "input_form")

_IEFormElementCheckboxSelect ($oForm, '1' , "", 0, "byValue" )  ;gid_1 deselect if selected
Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "2", "", 1, "byValue")    ;gid_2 = select Section 508
Sleep(1000)

_IEFormElementCheckboxSelect ($oForm, "3", "", 0, "byValue")    ;gid_3 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "4", "", 0, "byValue")    ;gid_4 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "5", "", 0, "byValue")    ;gid_5 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "6", "", 0, "byValue")    ;gid_6 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "7", "", 0, "byValue")    ;gid_7 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "8", "", 0, "byValue")    ;gid_8 deselect if selected
Sleep(1000)
_IEFormElementCheckboxSelect ($oForm, "9", "", 0, "byValue")    ;gid_8 deselect if selected
Sleep(1000)

;***********code Ends*************

jfcby


Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.