Jump to content

ask for help for click input type = hidden


Recommended Posts

html code below,

<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<FORM onsubmit="return false;" name=exportform>
<INPUT value=false type=hidden name=fieldsyn>
<INPUT value=false type=hidden name=notesyn>
<INPUT value=false type=hidden name=statusyn>
<INPUT type=hidden name=statusmonth>
<INPUT type=hidden name=statusyear>
<INPUT value=false type=hidden name=exportyn>
<INPUT value=false type=hidden name=lettersyn>
<INPUT value=false type=hidden name=regionsyn>
<INPUT value=false type=hidden name=tu_exportyn>
<INPUT value=false type=hidden name=score_exportyn> </FORM>

I need to click the box name=exportyn

 

My code as below,

Local $oInputs = _IETagNameGetCollection($oForm, "input")
 For $oInput In $oInputs
    IF $oInput.value = True and String($oInput.NAME) = "exportyn" THEN
       ConsoleWrite($oInput.name)
    _IEFormElementCheckBoxSelect($oInputs, "", "exportyn", 1, "byValue")
    ExitLoop
    EndIf
 Next

no luck, also tried

$oeles = _IEFormElementGetCollection($oform)
For $oele In $oeles
if $oele.name = "exportyn" and $oele.value="false" then _IEFormElementSetValue($oele, "True",1)
ConsoleWrite(@TAB & 'Name: ' & $oele.name & '   Tag Type: ' & $oele.tagName & '    Value: ' & $oele.value & '   Type: ' & $oele.type &@CRLF)

_IEAction($oele.name, "click")
Next

still no luck

but console gave me:

"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "N:MY AUTOITtest1.au3"    
    Name: fieldsyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: notesyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: statusyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: statusmonth   Tag Type: INPUT    Value:    Type: hidden   ID:
    Name: statusyear   Tag Type: INPUT    Value:    Type: hidden   ID:
    Name: exportyn   Tag Type: INPUT    Value: True   Type: hidden   ID:
    Name: lettersyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: regionsyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: tu_exportyn   Tag Type: INPUT    Value: false   Type: hidden   ID:
    Name: score_exportyn   Tag Type: INPUT    Value: false   Type: hidden   ID:

Link to comment
Share on other sites

BTW:

Would you please be so kind and use AutoIt code tags when posting code?

That is the blue "A" button in the editor. Makes the code much more readable :)

Details can be found >here.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hi,

I tries _IEACTION and _IEFormElementCheckBoxSelect, no luck

$L_o_Inputs = _IETagNameGetCollection($oForm, "INPUT")
    $L_iInputCnt = @extended
    ConsoleWrite("Found " & $L_iInputCnt & " input tags" & @LF)
    Local $flagRFC = 0
    If $L_iInputCnt Then
        For $L_oInput In $L_o_Inputs
            If $L_oInput.name = "exportyn" Then
                ConsoleWrite("Found exportyn" & @LF)
                _IEAction($L_oInput, "click")
;~              _IEFormElementCheckBoxSelect($L_oInput, "exportyn", "", 1, "byValue")
            EndIf
        Next
    EndIf
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...