-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Selenium developers,

First, thanks a lot for the great work. Selenium is IMHO doing a bunch
of things differently *and* right, and thus stands a step ahead of all
the other Web testing frameworks that I know of.

I'm working to integrate Selenium into a larger thing that I'm writing
(in Perl), and I'm hoping to make modest contributions to Selenium in
the process. Therefore I'm requesting your approval and feedback so as
to make sure I'm going in the right direction.

My first planned contribution is about going "technical-less" in
Selenese scripts. My target environment requires the scripts to be
written by non-techies, who don't know "view source" or "DOM
inspector" and don't want to learn. Therefore I want them to be able
to transcribe actions directly from the functional requirements (e.g.
"user clicks on the Cancel button" -> |click|button_label=Cancel|;
"user fills up the Name field with value Smith" ->
|type|field_label=Name|Smith|).

Therefore I propose to implement a new set of locators for Selenium,
named "button_label=", "checkbox_label=", "radio_label=",
"select_label=", "field_label" and "link_label=", that would work like
this:

    * they all take a string or regex as a parameter. In the case of a
      string, spaces are insignificant
    * Locators select exclusively form elements of the relevant kind:
      button_label= for form buttons (including "reset" buttons),
      checkbox_label= for checkboxes, radio_label= for radio buttons,
      select_label= for single- or multiple-choice select boxes,
      field_label= for text fields and textarea's, and link_label= for
      hyperlinks (for consistency mostly, as there is already a "link=").
    * buton_label= and link_label= are the only cases where the
      relationship between label text and form widget can be deducted
      with certainity from the HTML structure of the document. In all
      other cases, a heuristics needs to be applied unless HTML
      <LABEL> elements are in use in the source document. I have such
      a heuristics ready (and implemented in Perl as a patch to
      WWW::Mechanize that I wrote long ago), but I will save that for
      another email so as not to bore you too much.

Please let me know whether you think implementing this proposal would
be a useful addition to Selenium. With regards,

- --
Dominique QUATRAVAUX                           Ingénieur senior
01 44 42 00 08                                 IDEALX

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDVLJZMJAKAU3mjcsRAiKPAJ0WI3sQIVr7b4mjgNaBwT2dqGdM1gCgwSoE
3oT5vjR6YkgP6PGQxmVswiE=
=Uq6A
-----END PGP SIGNATURE-----


_______________________________________________
Selenium-devel mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel

Reply via email to