Asserting component enability [message #67317] |
Wed, 26 December 2007 06:08  |
Eclipse User |
|
|
|
Hi,
Firstly, Merry Christmas to RAP Team.
I need to assert menu enability but I've found no way of doing this using
Selenium since I don't know what attribute to check.
Using Firebug I found that the difference between enabled & disabled menu
is only on the RGB attribute of the resultant div element, but Selenium
does not provide a way to check this attribute.
Any help would be greatly appreciated.
Best Regards,
Setya
|
|
|
|
Re: Asserting component enability [message #67686 is a reply to message #67386] |
Wed, 02 January 2008 01:04   |
Eclipse User |
|
|
|
Benny,
Thank you very much for your suggestion.
> One idea is to ask the RAP WidgetManager to give you
> the widget associated with the id of the div (see UITest stuff new in
> RAP CVS) together with WidgetManager#findWidgetById. This will return
> the widget instance itself (a qooxdoo class instance) where you can
> check the enablement of the menu item.
>I think you can package this as a
> selenium extension to have a wrapper which does this kind if stuff (see
> RAP UI Test page - that approach uses also an own selenium extension).
My questions:
1. If I put some widgets in my app I can assign their id's using setData,
but how do you assign id to components rendered by RAP, like menus,
coolbar buttons, views, editors, etc ?
2. I've toyed around with Selenium extension, but I didn't know that I can
return a qooxdoo class instance. Could you elaborate more on this ?
Regards,
Setya
|
|
|
Re: Asserting component enability [message #68125 is a reply to message #67686] |
Thu, 03 January 2008 05:24   |
Eclipse User |
|
|
|
Hi,
> 1. If I put some widgets in my app I can assign their id's using setData,
> but how do you assign id to components rendered by RAP, like menus,
> coolbar buttons, views, editors, etc ?
I have found out that RAP by default generated the id's for some of the
div elements.
> 2. I've toyed around with Selenium extension, but I didn't know that I can
> return a qooxdoo class instance. Could you elaborate more on this ?
How can I get a reference to WidgetManager from user-extensions.js ?
Regards,
Setya
|
|
|
Re: Asserting component enability [message #68698 is a reply to message #68125] |
Thu, 03 January 2008 06:26   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Setya,
see my comments inline.
Cheers,
Rüdiger
Setya wrote:
> Hi,
>
>> 1. If I put some widgets in my app I can assign their id's using
>> setData, but how do you assign id to components rendered by RAP, like
>> menus, coolbar buttons, views, editors, etc ?
>
> I have found out that RAP by default generated the id's for some of the
> div elements.
If UI tests are enabled, RAP assigns the widget-id to the outermost DOM
element that represents the widget on the client-side.
>
>> 2. I've toyed around with Selenium extension, but I didn't know that I
>> can return a qooxdoo class instance. Could you elaborate more on this ?
>
> How can I get a reference to WidgetManager from user-extensions.js ?
The client-side WidgetManager can be used like this:
var wm = org.eclipse.swt.WidgetManager.getInstance()
// obtain reference to qooxdoo widget
var widget = wm.findWidgetById( "<my-widget-id>" );
// obtain id for widget
var widgetId = wm.findIdByWidget( widget );
Please be aware that this is no API (yet) and thus may change without
further notice.
>
> Regards,
>
> Setya
>
|
|
|
|
|
|
Re: Asserting component enability [message #69522 is a reply to message #69289] |
Wed, 09 January 2008 13:26  |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Setya,
as said, the current implementation only assigns an id to the outermost
DOM element.
Regarding the Table, TableItems are not directly represented by DOM
elements. This was done for performance reasons. Tests showed that even
a table with only 80-90 items, and each item having its own DOM element,
became almost unusable. Therefore, currently, the client-side TableItem
is only a data object that is rendered inside the Tables client area as
soon as it becomes visible.
Cheers,
Rüdiger
Setya wrote:
> Rüdiger,
>
>> If UI tests are enabled, RAP assigns the widget-id to the outermost
>> DOM element that represents the widget on the client-side.
>
> Given your explanation above, is it possible to assign id to children
> widgets ? For instance, for Table widget I'd like to assign id to each
> TableItem, this way I can use their id's instead of XPath to tell
> Selenium to click the rendered element.
>
> Regards,
>
> Setya
>
|
|
|
Powered by
FUDForum. Page generated in 0.03638 seconds