On Fri, Feb 25, 2011 at 4:25 PM, GerhardH <gerhard....@nsn.com> wrote:
> Now I want to perform a click on a table header cell (to sort the
> table by the clicked column). But SwingLibrary does not support this.
I found out that Jemmy supports getting coordinates of a table header
column via JTableHeaderOperator. I created an enhancement request for
SwingLibrary about this [1]
[1] http://code.google.com/p/robotframework-swinglibrary/issues/detail?id=184
thanks,
--J
--
Janne Härkönen | http://reaktor.fi
http://twitter.com/#!/janneharkonen
I just solved it by implementing my own Java keyword, but only for this special application, so it is only a workaround. I loop through all the components and subcomponents to find the JTableHeader object; from that object I call getLocationOnScreen and from the columns getWidth. So I can calculate the position to click.
With these values I call mouseMove of class java.awt.Robot and then mousePress and mouseRelease.
Using mouseClick from jemmylibs MouseDriver always crashed, with not helpful exception text.
Best regards
Gerhard