<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 11, 2013 at 9:25 PM, James Forrester <span dir="ltr"><<a href="mailto:jforrester@wikimedia.org" target="_blank">jforrester@wikimedia.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">
I believe Inez (copied) from Wikia who is working on VisualEditor said that the Java Selenium driver could do this, but that others generally couldn't… but that could be me mis-remembering.</div></div></blockquote><div>
<br></div><div>Every language that has full support for WebDriver (Java, C#, Python, Ruby) should support the full range of DOM events:  <a href="http://www.w3schools.com/jsref/dom_obj_event.asp">http://www.w3schools.com/jsref/dom_obj_event.asp</a></div>
<div><br></div><div>Here is an example of a WIP test for the very latest VisualEditor using "fire_event(onfocus)", now required to enable the "Save page" button when doing send_keys to the contentEditable field of the editor:  <a href="https://gerrit.wikimedia.org/r/#/c/83817/6/modules/ve-mw/test/browser/features/step_definitions/visual_editor_steps.rb">https://gerrit.wikimedia.org/r/#/c/83817/6/modules/ve-mw/test/browser/features/step_definitions/visual_editor_steps.rb</a> (line 46)</div>
<div><br></div><div>It is common to need these events from time to time to exercise browsers properly.  For example, you could explicitly emulate an action with </div><div><br></div><div>page.content_element.fire_event('onfocus')<br>
</div><div>page.content_element.fire_event('onkeydown')<br></div><div>page.content_element.send_keys('H')<br></div><div>page.content_element.fire_event('onkeyup')<br></div><div><div>page.content_element.fire_event('onkeydown')<br>
</div><div>page.content_element.send_keys('i')<br></div><div>page.content_element.fire_event('onkeyup')</div></div><div><br></div><div>but in practice you'll rarely need that kind of fine control. </div>
<div><br></div><div>-Chris </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">

</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 11 September 2013 21:17, Amir E. Aharoni <span dir="ltr"><<a href="mailto:amir.aharoni@mail.huji.ac.il" target="_blank">amir.aharoni@mail.huji.ac.il</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5"><div dir="rtl"><div dir="ltr">
If I understand correctly, Selenium's send_keys send strings or characters rather then actual keypresses.<br>

<br>Is there a way to send actual keypresses? It's useful for testing different keyboard layouts. See my question on StackOverflow about it: <a href="http://stackoverflow.com/questions/18754576/can-i-use-seleniums-send-keys-or-some-other-function-to-send-actual-keys-rather" target="_blank">http://stackoverflow.com/questions/18754576/can-i-use-seleniums-send-keys-or-some-other-function-to-send-actual-keys-rather</a><br>




--<br>Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי<br><a href="http://aharoni.wordpress.com" target="_blank">http://aharoni.wordpress.com</a><br>‪“We're living in pieces,<br>I want to live in peace.” – T. Moore‬</div>




<div dir="ltr">
</div></div>
<br></div></div>_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org" target="_blank">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
<br></blockquote></div><span class=""><font color="#888888"><br><br clear="all"><div><br></div>-- <br>James D. Forrester<br>Product Manager, VisualEditor<br>Wikimedia Foundation, Inc.<br><br><a href="mailto:jforrester@wikimedia.org" target="_blank">jforrester@wikimedia.org</a> | @jdforrester
</font></span></div>
<br>_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
<br></blockquote></div><br></div></div>