tags:

views:

21

answers:

1

Hi, using Ruby and webrat, I've got difficulties to click the OK button in the following HTML form :

<form name="frmLogin" id="frmLogin" action="logininstit.do" method="post" validation="N" onkeydown="performDefaultButton(event, this, 'valider', false);" onkeypress="performDefaultButton(event, this, 'valider', true);"  onsubmit="return vldSubmit(this);"> 
        <p class="labeltxt">N° d'abonné</p> 
        <p> 

                <input type="text" name="username" id="username" oblig="N"   class="txt" mlength="30" regexp="" value="" lib="login.usercode" onBlur=";traiteBlur(this);" onFocus=";traiteFocus(this);" onKeyPress="return vldFrappe(event);" /> 

        </p> 

        <p class="labeltxt2">Code confidentiel</p> 
        <p style="float:left"> 

               <input type="password" name="password" id="password" oblig="N" class="txt" mlength="20" lib="login.userpwd" onBlur="traiteBlur(this);" onFocus="traiteFocus(this);" /> 

        </p> 

        <p style="padding:0px;margin:0px"><input type="submit" value="" class="ok" title="OK" /></p>    
        <p class="info"><a href="javascript:openHelp();">Informations</a></p> 
        <input type="hidden" name="lang" id="lang" value="fr"/>         
    </form> 

Of course I already tried click_button "OK"

Any idea ?

A: 

Should the HTML be value="OK" instead of title="OK"?

jordinl
Yes sure, but I can't change the HTML, it's not my website ;-)
Chris
just guessing here... but what about doing 'click_button ""'?
jordinl