Chuck van der Linden wrote: > On Apr 10, 6:10 am, Jarmo Pertman <jarm...@gmail.com> wrote: > >> On Apr 9, 8:16 pm, Chuck van der Linden <sqa...@gmail.com> wrote:> I think >> you are calling the wrong method for what it looks like you >> >>> are trying to do. >>> >>> .value returns the current value in the text field.. >>> >>> to set the text field to a particular string you want .set >>> >> No you don't want to use .set. It has been discussed before that .set >> is much slower than .value= (maybe Bret can give some more details >> about the reason) and it is not wrong method when dealing with >> text_field objects. >> > > IF that's the case, then do we need to update the cheat sheet? > http://wiki.openqa.org/display/WTR/Cheat+Sheet > > it's telling users to use SET, and if there's a performance hit for > doing that, then is that the best thing for us to be doing there Set is the correct method for the cheatsheet.
Set sets the text_field like a user would. It generates lots of suitable events. It respects maxlength. Using "value=" does not. Set also includes intentional delays to make it look more realistic. If you want to remove these delays (but retain the rest), use :zippy speed. Many people got into the habit of using "value=" before we implemented :zippy speed. Maybe we should add :zippy speed to the cheat sheet. Bret -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Watir Training: Portland/Beaverton April 16-17 www.watircraft.com/training --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---