Oops, that's the output of #inspect. Element#to_s isn't overriden at all.
On Thu, Sep 30, 2010 at 5:53 PM, Jari Bakken <[email protected]> wrote: > I think #to_s should look similar to the the default Object#to_s. In > watir-webdriver, it looks like this: > > #<Watir::Div:0x..fc54a4c94 located=false selector={:tag_name=>"div"}> > > > On Thu, Sep 30, 2010 at 3:55 PM, Željko Filipin > <[email protected]> wrote: >> Hi, >> >> I am working on WTR-93 [1]. I have an idea. Should we replace all "show" >> methods (for example divs.show and show_divs) with to_s? We would get: >> >> puts browser.elements.to_s instead of browser.show_all_objects >> puts browser.divs.to_s instead of browser.divs.show and browser.show_divs >> ... >> >> It would be easier to test, because the method would just return a string. >> >> What do you think? >> >> Željko >> -- >> [1] http://jira.openqa.org/browse/WTR-93 >> >> _______________________________________________ >> Wtr-development mailing list >> [email protected] >> http://rubyforge.org/mailman/listinfo/wtr-development >> > _______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
