Hey all,

In a nutshell, I want to select a particular link with the text "more
options", but there are many links with this text on the page, and I can't
depend on index to find the right one. For example, this works today but
maybe not next week:
  br.div(:text => "more options", :index => 2).click

Here's a snippet from the source (with the div I want to click highlighted):

    <div class="typebox-container">
      <div class="typebox-container-right">
        <div class="typebox-container-left">
          <div class="typebox-column">
            <div class="typebox-column-top"></div>
            <div class="typebox-column-title">
              <a href="/view/people/deceased_person"
class="typebox-column-title-link">Deceased Person</a>
            </div>

            <div class="typebox-column-menu menu-container">
              <div class="typebox-column-menu-title menu-title
popup-trigger">more options</div>

You can view the page itself here
http://sandbox.freebase.com/view/en/jared_sparks but basically there are a
number of divs just like this. Their main identifying characteristic is in
the href link and text. (In this case Deceased Person.)

So in the end what I'd like to do is <pseudocode>
Find the div(:class, "typebox-container") which contains the div(:text,
"Deceased Person"). Within *this particular* div(:class,
"typebox-container"), div(:text, "more options").click

The closest I know how to do is:
  br.div(:class, "typebox-container").div(:text, "more options").click

Which still just clicks the first one.

Thanks in advance for any help!

BTW, I happened to be in Denver at the right time and so just attended
FROSST1 http://www.frosstcon.com/ It was great fun, and amongst the
highlights was meeting Pete Dignan (of WatirCraft and ProtoTest) and a bunch
of other Watiristas. I hope to blog about it soon.

-- 
Jeff Fry

http://testingjeff.wordpress.com
http://associationforsoftwaretesting.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to