[QA] Is it possible to send actual keypresses instead of strings?

Nikolas Everett neverett at wikimedia.org
Fri Sep 13 06:01:29 UTC 2013


On Thu, Sep 12, 2013 at 11:25 AM, Amir E. Aharoni
<amir.aharoni at mail.huji.ac.il> wrote:
> 2013/9/12 Nikolas Everett <neverett at wikimedia.org>
>>
>> I'm not sure sending the actual keys would be all the productive any
>> way unless visual editor itself (not the operating system) is doing
>> something special with keypresses for that language.  From my somewhat
>> limited experience with Japanese typing is handled by programs outside
>> the browser that drop characters into it once you've decided that they
>> are correct.  You'd be testing an operating system feature.
>
>
> I want to test that this operating system feature behaves nicely with
> the VisualEditor.
>
>>
>> Worse
>> yet, in the example of Japanese there are (at least) two keyboard
>> layout techniques that translate my familiar American keyboard into
>> Japanese, one based on English phonetics (mostly two strokes per
>> hiragana character) and one designed for mostly single stroke per
>> hiragana character.
>
>
> Yes, probably even more than two, and I want to test them all. Yes,
> it's ambitious :)

Very!

>
>>
>> You still need other key presses to change the
>> hiragana to katakana or the particular kanji that you meant but the
>> problem remains - when you do send_key :a_key which keyboard layout do
>> you mean to use?
>
>
> I plan to have tests for all of them Some Day. How exactly? - That's a
> topic for another thread.

Getting support from Sauce Laba for this would really really help.
Without it I can't see us being able to run the tests consistently.

>
>>
>> When you want to select kanji from the list is it
>> two presses of the "squash" character to turn your hiragana to the
>> kanji you want or three?
>
>
> I want to test all input methods, and I want to test the whole
> process, including selecting one of the proposed spellings with arrows
> and other keys. Ironically, it looks like simulating arrow keys is
> easily supported out of the box according to [1], but not the letter
> keys, but I may be missing something - that's what my main question in
> this thread is.

I wish I knew of a good way to do this but I'm afraid I can't help.

>
>>
>>
>> I can certainly see us wanting to make sure that, for example, the
>> squashing process used to build kanji doesn't cause visual editor to
>> go crazy and throw characters on different lines while the user picks
>> from their list, but for the most part questions like did sending the
>> sequence "w a t a s i h a <squash>" spit out "私は" is the operating
>> systems problem.
>
>
> See bug https://bugzilla.wikimedia.org/52716 for an example: The
> resulting characters may be correct (or not), but there's also the
> question of cursor placement and other possible issues. That bug is
> fixed, but I want to make sure we have a regression test and of course
> other bugs may pop up.

I was afraid that we'd end up with a good reason to test this.  I hope
Chris' way works but don't have a good feeling about it.  If it
doesn't work you may want to reach out on the selenium mailing lists
and see if anyone has a solution.

>
> [1] http://selenium.googlecode.com/svn/trunk/docs/api/rb/Selenium/WebDriver/Keys.html#KEYS-constant
>
> --
> Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
> http://aharoni.wordpress.com
> ‪“We're living in pieces,
> I want to live in peace.” – T. Moore‬
>
> _______________________________________________
> QA mailing list
> QA at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/qa



More information about the QA mailing list