[Windmill-dev] mouseover and mouseout
Mikeal Rogers
mikeal at osafoundation.org
Fri Dec 14 22:37:27 PST 2007
Robert,
In case you aren't on the commits email list, your change was
committed to the trunk in revision 615.
This will make it in to the next bugfix release, 0.3.5, which should
be done in less than a week.
-Mikeal
On Dec 14, 2007, at December 14, 20074:28 PM, Adam Christian wrote:
> Fantastic! It's really exciting to see that things are done in a
> sane enough way that outsiders can contribute to satisfy their
> needs. Since we don't yet have as huge a community as selenium it is
> difficult to keep up with the pure feature coverage. I will
> absolutely incorporate you contribution ASAP as it is exactly how I
> would have done it. (I'll take a look at the unit tests, been a wild
> week).
>
> Thanks again for the contribution.
>
> Adam
>
> On Dec 14, 2007, at 4:15 PM, Robert Leftwich wrote:
>
>> I had a need for these commands, so I've added them. Following is the
>> svn diff - hopefully I made all the required changes, including
>> adding
>> some unit tests.
>>
>> I note that some of the unit tests in test_unit.py are failing - but
>> that was before I changed anything :-)
>>
>> Robert
>>
>>
>> Index: test/test_live/test_unit.py
>> ===================================================================
>> --- test/test_live/test_unit.py (revision 614)
>> +++ test/test_live/test_unit.py (working copy)
>> @@ -70,6 +70,10 @@
>> assert client.asserts.assertText(validator=u'mouse downed',
>> id=u'mousedownme')['result']
>> assert client.mouseup(id=u'mouseupme')['result']
>> assert client.asserts.assertText(validator=u'mouse upped',
>> id=u'mouseupme')['result']
>> + assert client.mouseover(id=u'mouseoverme')['result']
>> + assert client.asserts.assertText(validator=u'mouse overred',
>> id=u'mouseoverme')['result']
>> + assert client.mouseout(id=u'mouseoverme')['result']
>> + assert client.asserts.assertText(validator=u'mouse outed',
>> id=u'mouseoverme')['result']
>> assert client.asserts.assertNode(id=u'amIhere')['result']
>> assert
>> client.asserts.assertProperty(validator=u'style.height|50px',
>> id=u'amIhere')['result']
>> assert not client.asserts.assertNode(id=u'doesntExist')['result']
>> Index: test/test_live/unit_tester.html
>> ===================================================================
>> --- test/test_live/unit_tester.html (revision 614)
>> +++ test/test_live/unit_tester.html (working copy)
>> @@ -70,8 +70,10 @@
>>
>> <div id="mousedownme"
>> style="position:relative;width:200px;height:50px;border:1px solid
>> red;"
>> onmousedown="document.getElementById('mousedownme').innerHTML =
>> 'mouse
>> downed';"></div><br>
>>
>> -<div id="mouseupme"
>> style="position:relative;width:200px;height:50px;border:1px solid
>> purple;" onmouseup="document.getElementById('mouseupme').innerHTML =
>> 'mouse upped';"></div><br>
>> +<div id="mouseupme"
>> style="position:relative;width:200px;height:50px;border:1px solid
>> purple;" onmouseup="document.getElementById('mouseupme').innerHTML =
>> 'mouse upped';"></div><br><br>
>>
>> +<div id="mouseoverme"
>> style="position:relative;width:200px;height:50px;border:1px solid
>> purple;"
>> onmouseover="document.getElementById('mouseoverme').innerHTML =
>> 'mouse overred';"
>> onmouseout="document.getElementById('mouseoverme').innerHTML = 'mouse
>> outed';"></div><br>
>> +
>> <div id="amIhere" style="width:200px;height:50px;border:1px solid
>> black;"></div><br>
>>
>> <div id="jsidTeset" style="width:200px;height:50px;border:1px solid
>> orange;"></div>
>> Index: windmill/html/js/controller/controller.js
>> ===================================================================
>> --- windmill/html/js/controller/controller.js (revision 614)
>> +++ windmill/html/js/controller/controller.js (working copy)
>> @@ -327,7 +327,21 @@
>> return true;
>> };
>>
>> + this.mouseover = function (param_object){
>> + var mdnElement = this._lookupDispatch(param_object);
>> + windmill.events.triggerMouseEvent(mdnElement, 'mouseover',
>> true);
>> +
>> + return true;
>> + };
>>
>> + this.mouseout = function (param_object){
>> + var mdnElement = this._lookupDispatch(param_object);
>> + windmill.events.triggerMouseEvent(mdnElement, 'mouseout', true);
>> +
>> + return true;
>> + };
>> +
>> +
>> //Browser navigation functions
>> this.goBack = function(param_object){
>> windmill.testWindow.history.back();
>> Index: windmill/html/js/wm/registry.js
>> ===================================================================
>> --- windmill/html/js/wm/registry.js (revision 614)
>> +++ windmill/html/js/wm/registry.js (working copy)
>> @@ -32,6 +32,8 @@
>> windmill.registry.methods['doubleClick'] = {'locator': true,
>> 'option': false};
>> windmill.registry.methods['mousedown'] = {'locator': true,
>> 'option': false};
>> windmill.registry.methods['mouseup'] = {'locator': true,
>> 'option': false};
>> +windmill.registry.methods['mouseout'] = {'locator':
>> true,
>> 'option': false};
>> +windmill.registry.methods['mouseover'] = {'locator':
>> true,
>> 'option': false};
>> windmill.registry.methods['type'] = {'locator': true,
>> 'option': 'text'};
>> windmill.registry.methods['radio'] = {'locator': true,
>> 'option': false };
>> windmill.registry.methods['check'] = {'locator': true,
>> 'option': false };
>>
>>
>> _______________________________________________
>> Windmill-dev mailing list
>> Windmill-dev at osafoundation.org
>> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
>
> _______________________________________________
> Windmill-dev mailing list
> Windmill-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
More information about the Windmill-dev
mailing list