1
<div class="wizardPanel box cf" id="wizardPanel">
    <p class="validation-msg error visually-hidden" id="error0"><span data-icon="warn"></span>Your departure and arrival cites must be different. Please correct the highlighted fields below.</p>
    <p class="validation-msg error visually-hidden" id="error1"><span data-icon="warn"></span>The return date must be later than the departure date. Please select a different date.</p>
    <p class="validation-msg error visually-hidden" id="error2"><span data-icon="warn"></span>Sorry, we're able to book only 1 to 6 passengers total per itinerary.</p>
    <p class="validation-msg error visually-hidden" id="error3"><span data-icon="warn"></span>Please select the ages of the children traveling.</p>
    <p class="validation-msg error visually-hidden" id="error4"><span data-icon="warn"></span>We are only able to book one infant in lap per traveler aged 12+.</p>
    <p class="validation-msg error visually-hidden" id="error5"><span data-icon="warn"></span>Children must not be allowed to travel without either a Senior or Adult.</p>
    <p class="validation-msg error visually-hidden" id="error6"><span data-icon="warn"></span>Please check the date highlighted below. Date format should be mm/dd/yy.</p>
    <p class="validation-msg error visually-hidden" id="error7"><span data-icon="warn"></span>Departure airport field is empty. Please enter correct airport name.</p>
    <p class="validation-msg error visually-hidden" id="error8"><span data-icon="warn"></span>Arrival airport field is empty. Please enter correct airport name.</p>
</div>

上記のHTMLマークアップでは、テキストがユーザーに表示されるかどうかを調べようとしています。そのために、私はWatir-webDriverでうまく機能するが、Watir-Classicでは機能しない次のコードを使用しています(常にreturns false):

@browser.div(:id => 'wizardPanel').p(:id => 'error2')..present?

誰かがFireFox、IE、Chromeブラウザで動作させるのを手伝ってもらえますか?

4

1 に答える 1

0

試す

@browser.div(:id => 'wizardPanel').p(:id => 'error2').visible?
于 2012-10-20T00:40:49.143 に答える