Web ページからテキストを取得し、コンソールに配置する必要があります。以下の html からテキストを取得できません。誰でもこれについて私を助けてください。
<div class="twelve columns">
<h1>Your product</h1>
<p>21598: DECLINE: Decline - Property Type not acceptable under this contract</p>
<div class="row">
</div>
私はb.div(:class => 'twelve columns').exist?irbを試してみましたtrue。
私はこれを試しました - b.div(:class => 'twelve columns').text、段落ではなくヘッダーのテキストを返します。
- で試してみましたがb.div(:class => 'twelve columns').p.text、返されましたerror - unable to locate element, using {:tag_name=>"p"}