Daniel Wagner wrote:
> Hi Loïc,
>
> Loïc - Novlog schrieb:
>> Daniel Wagner wrote:
>>> You could extract the identifiers and then use Selenium's getEval to
>>> retrieve the labels:
>>>
>>> selenium.getEval("selenium.browserbot.getCurrentWindow().qx.core.ObjectRegistry.fromHashCode(dx).getLabel()");
>> Thank you for the tip about the object registry. It allowed me to get
>> selected item(s) of a List and a SelectBox, and also the selected rows
>> of a table (although there were some more things to do).
>
> That sounds interesting, could you briefly outline what else you had to
> do to get the selected rows?
There's mainly 3 steps:
1/ I get the selection model by calling qxObjectExecFunction on my table
with the method getSelectionModel
2/ I use the hashcode of the model to get the number of selected items
(a selected items begin a block of selected rows, see
http://demo.qooxdoo.org/0.8.x/apiviewer/#qx.ui.table.selection.Model)
selenium.getEval("selenium.browserbot.getCurrentWindow().qx.core.ObjectRegistry.fromHashCode(\"model-hashcode\").getSelectedCount()")
3/ With a simple for() instruction, I use again the model hashcode to
get minIndex and maxIndex properties for each object of the selected
items array of the model . From there, I can easily get all selected
rows indexes.
selenium.getEval("....fromHashCode(model-hashcode).__selectedRangeArr[i].minIndex");
or
selenium.getEval("....fromHashCode(model-hashcode).getSelectedRanges()[i].minIndex");
(might be better if the code of the selection model changes)
All this may not be very optimized, but at least it works and I was lazy
to look deeply into the code of Tables. Maybe I'll try to find a better
way later, but for the moment I still need to know I can test everything
I have to with the Simulator, and there are some more things one the way.
--
Loïc - Novlog
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel