Alex nailed it. Please verify your success or failure. BTW: A research method I use when I don't know is a quick google search for example the topic "watir count elements in div" produced a similar answer http://stackoverflow.com/questions/6433084/how-to-get-the-number-of-elements-having-same-attribute-in-html-in-watir
On May 16, 4:22 am, Alex Rodionov <[email protected]> wrote: > That's pretty straightforward: > > browser.div(id: 'boxContainer').sections.size > > > > > > > > On Thursday, May 16, 2013 1:03:39 PM UTC+7, [email protected] wrote: > > > HI All, > > > I am new to Watir and I need to get the count of sections within a > > specific DIV. Please see below. > > > <section id="lsBodyContent"> > > <div id="boxContainer" class="lsBoxContainer"> > > <section class="lsNewContentStructureBox ng-scope" > > ng-repeat="contentStructure in contentStructures"> > > <p class="ng-binding">Text 1</p> > > <a href="#/scheme/Text 1"> > > <p><img src="assets/img/edit.svg" alt="edit-image" > > class="lsEditImg"></p> > > </a> > > </section> > > <section class="lsNewContentStructureBox ng-scope" > > ng-repeat="contentStructure in contentStructures"> > > <p class="ng-binding">Text 2</p> > > <a href="#/scheme/Text 2"> > > <p><img src="assets/img/edit.svg" alt="edit-image" > > class="lsEditImg"></p> > > </a> > > </section> > > <section class="lsNewContentStructureBox ng-scope" > > ng-repeat="contentStructure in contentStructures"> > > <p class="ng-binding">Text 3</p> > > <a href="#/scheme/Text 3"> > > <p><img src="assets/img/edit.svg" alt="edit-image" > > class="lsEditImg"></p> > > </a> > > </section> > > </div> > > </section> > > > I need to get the number of sections within the DIV id "boxContainer" > > > Thanks, > > Bhagya. -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
