kournikola Posted October 18, 2007 Posted October 18, 2007 Hello I have to validate some form in automatic mode First step : login : ok Second step : clic on search button which is in javascript... I think i have to clic on rechercher.gif but it doesn't works Javascript make problem... Can anybody help me please Here my source code <tr> <td class="label">Parties au contrat</td> <td class="control"> <script language="Javascript"> function submitMulti9a05f56b93f9024bfa17815c6d40e23b() { submitfrmSearch(); } </script> <select name="PARTIECONTRAT" multiple size="4" > <a onmouseover="this.style.cursor='hand';" onclick="java script:openSearchPARTIECONTRAT();"> <img align="absbottom" src="images/icons/small/rechercher.gif" /></a> </select><script language="Javascript"> function openSearchPARTIECONTRAT() { var link = 'main?mod=home&act=listmultiple&tablename=R_CO_PARTIECONTRAT&fieldlib=CPC_LIBELLE&fieldid=CPC_ID&reltablename=&relfield=&relexternalkey=&label=Parties+au+contrat&frommodule=contrat&customformatter=com.legalsuite.form.DefaultComboValueFormatter&frmname=frmSearch&frmfield=PARTIECONTRAT&jsretour=submitMulti9a05f56b93f9024bfa17815c6d40e23b' ; var sel = window.document.frmSearch.PARTIECONTRAT ; var selected = '' ; var first = true ; for( var i = 0 ; i < sel.options.length ; i++ ) { var curopt = sel.options[ i ] ; if( ! first ) { selected += ';' ; }else{ first = false ; } selected += curopt.value ; } link += '&selected=' + selected ; popup( link, 600,310 ) ; } function prepareSubmitPARTIECONTRAT() { var sel = window.document.frmSearch.PARTIECONTRAT ; for( var i = 0 ; i < sel.options.length ; i++ ) { var curopt = sel.options[ i ] ; curopt.selected = true } } </script> <a onmouseover="this.style.cursor='hand';" onclick="java script:openSearchPARTIECONTRAT();"> <img align="absbottom" src="images/icons/small/rechercher.gif" /></a> </td> </tr> In autoit i do this: local $oForm = _IEFormGetObjByName($oIE, "frmSearch") local $oloupe = _IEFormElementGetObjByName($oForm, "PARTIECONTRAT") local $iScreenX = _IEPropertyGet($oloupe, "screenx") local $iScreenY = _IEPropertyGet($oloupe, "screeny") MouseClick("left",$iScreenX, $iScreenY) This doesn't works... Any ideas? Thanks Nico
DjDeep00 Posted October 18, 2007 Posted October 18, 2007 Try _IEImgClick($oIE, "/images/icons/small/rechercher.gif")
kournikola Posted October 18, 2007 Author Posted October 18, 2007 --> IE.au3 V2.3-1 Warning from function _IEImgClick, $_IEStatus_NoMatchI've tried this before but it failled tooWhen i do right clic on my search img on the website, i have : http://www.sygesco.log.intra.laposte.fr/images/blank.gif Pb with javascript perhaps
kournikola Posted October 18, 2007 Author Posted October 18, 2007 I don't know why there is no match with rechercher.gif anyone try form with javascript?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now