Hi, I'm having a problem with a text_field.  If I populate the value
with Watir, then submit, there is a validation that fails.  However, I
can manually type in the same value and the validation passes.
 
Here's some HTML:
<li class="post">
<a onclick="toggle('ownerToolbox_reportSale');
$('ownerToolbox_askingPrice').focus();" href="javascript:void(0)"
id="ownerToolbox_reportSale">Tell us it's for sale</a>
 
<div id="ownerToolbox_reportSale_toggleArea" class="hide tooltip
reportForSale">
 <a onclick="toggle('ownerToolbox_reportSale')"
href="javascript:void(0)" class="close">Close</a>
 <dl>
 <dt>Is This Home For Sale?</dt>
 
 <dd>
 <form method="post"
action="/HomeDetails,ownerToolbox.reportForSalePopup.reportForSaleForm.s
direct" name="reportForSaleForm_0" id="reportForSaleForm_0">
<div style="display:none;"><input type="hidden" name="formids"
value="ownerToolbox_askingPrice,salePriceField,claimTypeRadioGroup,Submi
tButton"/>
<input type="hidden" name="form:HomeDetails"
value="ZH4sIAAAAAAAAAI1Svy9DURQ+r9EY/EhpYkNDrQ8J0ZEmGk2kXjB1u7zTuvp673Xe
fb1tB2FhsLIZDMb+K0a7WIVVYnJfUSGRGu5w7znfd77z3a/zDEkzDAD2JEPNNCozCDDQVtwP
CcYOWYO5ARNVtyg0VpHGH29uX0/PcwlwipBssCDCJkHqu68U1feQzjpXk0OXDxcJgKZKPBXA
LDowLY1A2pUy2JNNl1BJ0gVJOyxAT6pIwYhCCnmo0S/H84/gGKALzjmQkZUKUlFUpJsNuKiF
WY9khQe47nO9aR8g3UNvo45IeKyKGlL1VpsHgTTzn/1mwYGpbzLNarjVQPJkqLmo9hEyCjAk
iaOwVnEpNCRLdokDs+LAXBstQ91auIHMR3KZ7+dJ1pCsjnhUH+rVf1NM9Ch6xRKr213BLDkw
85ukr9GxhkGz7MDsb2ikfHuJcX8t8IFNA6S0xa75occo1mJ7fsQnb38dmbjL0Mn99duLjU/5
Kz4KupHb57ql3gFtyY3GkAIAAA=="/>
<input type="hidden" name="reservedids" value="form:HomeDetails"/>
<input type="hidden" name="submitmode" value=""/>
<input type="hidden" name="submitname" value=""/>
</div>
  <fieldset>
   <p class="price"><label for="ownerToolbox_askingPrice">Sale
price<span class="required">*</span>:</label> <!-- sale price -->
 
<input type="text" name="salePriceField" value=""
id="ownerToolbox_askingPrice"/>
 
</p>
   
   <p>What is your relationship to this home?</p>
   
    <ul class="ownerToolbox_relation">
      <li><input type="radio" name="claimTypeRadioGroup" value="0"
id="ownerToolbox_owner"/> <label
for="ownerToolbox_owner">Owner</label></li>
      <li><input type="radio" name="claimTypeRadioGroup" value="1"
id="ownerToolbox_agent"/> <label for="ownerToolbox_agent">Listing
agent</label></li>
      <li><input type="radio" name="claimTypeRadioGroup"
checked="checked" value="2" id="ownerToolbox_other"/> <label
for="ownerToolbox_other">Other</label></li>
    </ul>
   
   
   <input type="hidden"
name="HomeDetails/ownerToolbox.reportForSalePopup.reportForSaleForm_Subm
itButton_submitflag"
id="HomeDetails/ownerToolbox.reportForSalePopup.reportForSaleForm_Submit
Button_submitflag" value="0"></input>
<button type="submit" name="SubmitButton"
onclick="document.getElementById('HomeDetails/ownerToolbox.reportForSale
Popup.reportForSaleForm_SubmitButton_submitflag').value='1';"
title="Submit" class="primary">
    <span>Save</span>
   </button>
   
   <button onclick="toggle('ownerToolbox_reportSale')"
href="javascript:void(0)" type="button" class="em">
    <span>Cancel</span>
   </button>
      
  </fieldset>
 </form>
 </dd>
 
 </dl>
</div>
</li>
 
And my code:
$b.link(:id, "ownerToolbox_reportSale").click
$b.text_field(:id, "ownerToolbox_askingPrice").set("234567")
$b.radio(:id, "ownerToolbox_agent").set
$b.button(:name, "SubmitButton").click
 
Just started working with Watir and it's great so far.  Any help is
appreciated!
 
____________________________________________________ 

Timm Mason
Software Test Engineer
P (206) 757-2736
F (206) 470-7001

  <http://www.zillow.com/>  
 

<<zillow_logo_emailsig.gif>>

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to