try modifying your XPath to use the following (worked for me using nokogiri)

"//*[@id='lblbirthday']"

and

"//*[@id='lblsexe']"



On Tue, Sep 11, 2012 at 3:16 PM, Charmaine Willemsen
<lists / ruby-forum.com>wrote:

> In this example i like to parse birthday and sexe
>
>
> <div class="floatleft">
>       <label for="lblbirthday" id="lblbirthdayLabel">birthday</label>
>       <span id="lblbirthday">6 apr 1961</span>
>     </div>
>     <div class="floatleft" style="margin-left: 50px;">
>       <label for="lblsexe" id="lblsexeLabel">sexe</label>
>       <span id="lblsexe">Male</span>
>     </div>
>
> -----------------------------------------------------------------------------
>
> These ruby script will not work, please who can help me?
>
> options[:birthday]      = find(:xpath, ".//span[contains(@id,
> \"lblbirthday\")]").text
> options[:sexe]          = find(:xpath, ".//span[contains(@id,
> \"lblsexe\")]").text
>
> --
> Posted via http://www.ruby-forum.com/.
>
>