autoit - how to submit the 3rd form on the current webpage -
i had edit question because felt not describing correctly
i trying submit form on current webpage. problem form trying submit coming 2 previous submit forms. cant call url using $oforms = _ieformgetcollection ($oie)
because original url of $oie
has changed.
i use on first form submit code works fine, once next page have new url , need submit form well. how can call current page , 3rd form on page , submit that?
$oforms = _ieformgetcollection ($oie) $oform in $oforms _ieformsubmit($oform) next
because page changing, original form collection becomes invalid when new page loaded. need new form collection each time.
the code have more like:
local $aformclassnames[3] = ["formclassnameonpage1", "formclass2", "etcetc"] $i = 1 3 $oform = _ieformgetobjbyname($oie, $aformclassnames[$i]) switch $i case 1 ; fill out form 1 case 2 ; fill out form 2 case 3 ; fill out form 3 endswitch _ieformsubmit($oform) next
it's better use form class name well, rather blindly submitting forms index. web developers use tags in strangest of places sometimes.
the above code , explanation case when submitting form leads new page new form.
for submitting 3rd form on single page, can still use _ieformgetobjbyname
. forms have different names, in case have same name, can use 3rd parameter of function specify 0 based index, example:
$oform = _ieformgetobjbyname($oie, "theformname", 2) _ieformsubmit($oform)
Comments
Post a Comment