[ 
http://jira.openqa.org/browse/WTR-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zeljko closed WTR-303.
----------------------

    Resolution: Won't Fix

If this is still a problem, please report it here: 
https://github.com/watir/watir-classic/issues

> Speed up FireWatir's TextField#set (zippy speed) with suggestion.
> -----------------------------------------------------------------
>
>                 Key: WTR-303
>                 URL: http://jira.openqa.org/browse/WTR-303
>             Project: Watir
>          Issue Type: Improvement
>          Components: FireWatir
>    Affects Versions: 1.6.2
>         Environment: Firefox 3.0, Ubuntu 8.10
>            Reporter: David Welton
>             Fix For: Future
>
>
> I took out all of the events and it speeds things up some.  It might be nice 
> to make this an option, with a bit of documentation explaining that it might 
> create problems if your script depends on Javascript events in the text 
> fields in question.
> {code}
>     module FireWatir
>       class TextField < InputElement
>         def doKeyPress( value )
>           begin
>             max = maxlength
>             if (max > 0 && value.length > max)
>               original_value = value
>               value = original_value[0...max]
>               element.log " Supplied string is #{suppliedValue.length} chars, 
> which exceeds the max length (#{max}) of the field. Using value: #{value}"
>             end
>           rescue
>             # probably a text area - so it doesnt have a max Length
>           end
>           for i in 0..value.length-1
>             # sleep element.typingspeed   # typing speed
>             c = value[i,1]
>             # element.log  " adding c.chr " + c  #.chr.to_s
>             @o.value = "#{(@o.value.to_s + c)}"   #c.chr
>           end
>     #      @o.fireEvent("onKeyDown")
>     #      @o.fireEvent("onKeyPress")
>     #      @o.fireEvent("onKeyUp")
>         end
>       end
>     end
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to