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.


Reply via email to