Jump to content
Sign in to follow this  
Thainan

Possible to select in IE a checkbox for text? (byText)

Recommended Posts

Thainan

Is it possible to select in IE a checkbox for text?
 


<TD width="33%" rowSpan="1" colSpan="1">

<INPUT name="Ck007099000013" class="inputRadio" id="Ck007099000013"  type="checkbox" value="13"/>

Alumínio

</TD>

 

My code attempt:

 

#include <IE.au3>

checkBoxName("AutoCalculo", "Alumínio")

Func checkBoxName($checkBoxForm, $checkBoxName)

    $oIE = _IECreate("https://www. ..........", 1, 1, 1, 1)
    Local $oForm = _IEFormGetObjByName($oIE, $checkBoxForm)
    _IEFormElementCheckBoxSelect($oForm, 0, $checkBoxName, 1, "byText")
EndFunc   ;==>checkBoxName

 

 

Is it possible to select by text? or just by value, name and ID?

Thank you!

Share this post


Link to post
Share on other sites
Danp2

According to the help file, the only valid options are ByValue and ByIndex. One option would be to use _IEFormElementGetCollection to get a collection of all form elements and then check each element until you find the desired one.

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  

×