Then use the solution provided by me :) Jarmo
On Jun 28, 5:55 pm, Ajitesh Srinetra <[email protected]> wrote: > Hi Joe > We have a complex GUI with the ext Frame work > This is having a lot of divs.Now coming to the solution iLastDivIndex > = browser.divs.length with fetch the index of the last div in the > page > But what I want is the index of the div with text "div". > > Thanks and Regards > Ajitesh Srinetra > > > > > > On Mon, Jun 28, 2010 at 7:05 PM, joedio <[email protected]> wrote: > > Ajitesh, > > > While I'm not sure why you would click on a div, > > but here's one way you could click on the last one: > > > # Get the total number of the div elements on the page > > iLastDivIndex = browser.divs.length > > > # Click on the last div element > > browser.div(:index, iLastDivIndex).click > > > Joe > > > On Jun 25, 7:03 am, Ajitesh Srinetra <[email protected]> > > wrote: > >> At present in my Web Page I can See a lot of divs and i access them > >> using indexes using this code > > >> ie.div(:text => 'div',:index =>1).click > >> ie.div(:text => 'div',:index =>2).click > >> ie.div(:text => 'div',:index =>3).click > >> ie.div(:text => 'div',:index =>4).click > > >> Is there any way I can click on the last Index directly like > >> ie.div(:text => 'div',:index =>Last).click > > >> -- > >> Thanks and Regards > >> Ajitesh Srinetra > > > -- > > Before posting, please readhttp://watir.com/support. In short: search > > before you ask, be nice. > > > You received this message because you are subscribed > > tohttp://groups.google.com/group/watir-general > > To post: [email protected] > > To unsubscribe: [email protected] > > -- > Thanks and Regards > Ajitesh Srinetra -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected] To unsubscribe: [email protected]
