I thought you wanted all the text, with the div tags? Are you trying to get "testdata1", "test data2", etc then?
If so, they are in another div, not the "testing_1" class, so I'd use xpath for each one, like this: ie.element_by_xpath("//d...@class = 'testing_1']/div").text # and div, div, etc. On Jan 13, 11:11 am, Soori <sure...@gmail.com> wrote: > Hi John, > > .html will return the html with <DIV>,etc, > > I would like to get only the text inside the div . > > Thanks, > Soori > On Jan 13, 3:30 pm, John Kolokotronis <johnj...@gmail.com> wrote: > > > Try ie.div(:class, "testing_1).html instead... > > > Regards, > > > John > > > On Jan 13, 10:20 am, Soori <sure...@gmail.com> wrote: > > > > All > > > > I am capturing the the text inside a div as mentioned below, > > > > <div><div class="testing_1"> > > > <div>testdata1</div> > > > <div>test data2</div> > > > <div>test:data3</div></div> > > > > ie.div(:class, "testing_1).text captures the information on a single > > > line... > > > > I would like to print it as shown on the html above. > > > > I got stuck in this.Please show me a way to proceed. > > > > Thanks in advance, > > > > /Soori
-- You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to firstname.lastname@example.org Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general