I don't like the function signature,
Element#click(button=0)
It isn't cross-browser (which number corresponds to which button varies from
browser to browser), and it's not at all readable.
Currently in my fork Element#click method implements an options hash with
default options of {:highlight => true, :wait => true} - by default it
highlights when it clicks, and waits after clicking.
I would like to see :button as an option hash key, with default of :left, so
a right-click would look like
element.click(:button => :right)

-Ethan

On Mon, Nov 23, 2009 at 12:36, Bret Pettichord <[email protected]> wrote:

> Any comments on this?
>
> ---------- Forwarded message ----------
> From: GitHub <[email protected]>
> Date: Mon, Nov 23, 2009 at 11:07 AM
> Subject: [GitHub] bendyworks sent you a message
> To: [email protected]
>
>
>
>
> bendyworks wants you to pull from bendyworks/watir at master
>
> Body: We added right_click and middle_click to element.rb in firewatir.
>  Testing this proved quite problematic without pulling in a framework like
> jQuery.  We are seeing the code work just fine in a customer project
> however.
>
> Since I'm assuming adding a dependence on jQuery is a no-no, this change is
> without a test.  Any suggestions?
>
> Thanks!
> -Steve-
>
> View repository: http://github.com/bendyworks/watir/tree/master
>
>
>
> --
> Bret Pettichord
> Lead Developer, Watir, www.watir.com
>
> Blog, www.io.com/~wazmo/blog <http://www.io.com/%7Ewazmo/blog>
> Twitter, www.twitter.com/bpettichord
>
>
> _______________________________________________
> 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

Reply via email to