Jump to content
Sign in to follow this  

Radio Button and Checkboxes

Recommended Posts


Please help to fill the form on the website

#include <IE.au3>

$Url = "http://privatpaketservice.hlg.de/wps/portal/PRIPS_DEU"
$oIE = _IECreate($Url, 0, 1, 1, 1)
$Url2 = "Online-Paketschein"
$test = _IELinkClickByText($oIE, $Url2)  
$oForm = _IEFormGetCollection($oIE, 0)   ;Formulardaten
$oFirma = _IEGetObjById($oForm, "absender(NACHNAME)")
_IEFormElementSetValue($oFirma, $aNACHNAME)
$oFirma = _IEGetObjById($oForm, "empfaenger(LAND)")
_IEFormElementOptionselect ($oFirma, $eLAND , 1, "byText", 0)
$oFirma = _IEGetObjById($oForm, "paket(p1)")
_IEFormElementSetValue($oFirma, "1")

;My problem starts here:
;Source from Website:
;<input type="checkbox" name="hoechstwert_unter_500" tabindex="58" value="on" style="border-width:0px;" id="bestaetigungWertBox" alt="noImageReplacement">
$oFirma = _IEGetObjById($oForm, "hoechstwert_unter_500")
msgbox(0,"ID Mir ist bekannt, ...","@error="&@error)   ;error = 0
$x = _IEFormElementCheckboxSelect ($oFirma,  "on", "", 1, "byValue")
msgbox(0,"BOX Mir ist bekannt, ...","@error="&@error)  ;error = 4 ($_IEStatus_InvalidObjectType) = Invalid Object Type

;and is still here
;Source from Website:
;<input  type="radio"   value="1"   alt="noImageReplacement" tabindex="57" id="mwStAusweis1" name="mwStAusweis1"
$oFirma = _IEGetObjById($oForm, "mwStAusweis1")
msgbox(0,"ID Ich versende als Unternehmer","@error="&@error)
_IEFormElementCheckboxSelect ($oFirma, 0, "", 1, "byIndex", 0)
msgbox(0,"BOX Ich versende als Unternehmer","@error="&@error)

Share this post

Link to post
Share on other sites

try :

$oFirma = _IEGetObjById($oIE, "hoechstwert_unter_500")


$oFirma = _IEGetObjById($oIE, "mwStAusweis1")

_ieGetObjByName and _IEgetObjByID don't work with the "form" but with IE itself.

If you're working with $oForm you can try _IEFormElementGetObjByName

Share this post

Link to post
Share on other sites

No, that was not the error.

But there are 2 Forms on Site and i referenced 1st instead of 2nd.

Thank you anyway.

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.