Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Inconsistent Id Generated on HTML Component
Inconsistent Id Generated on HTML Component [message #71991] Tue, 29 January 2008 04:50 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

The 1st time when running RAP with UI Test parameter enabled I notice that
the id generated starts from 'w3', but the next run it starts from 'w2',
this make it hard to write consistent components identification by their
Id's. Is there any reason why the Id does not consistently starts from
'w1' ?

Best Regards,

Setya
Re: Inconsistent Id Generated on HTML Component [message #72156 is a reply to message #71991] Tue, 29 January 2008 23:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Setya,

Setya wrote:
> The 1st time when running RAP with UI Test parameter enabled I notice that
> the id generated starts from 'w3', but the next run it starts from 'w2',
> this make it hard to write consistent components identification by their
> Id's. Is there any reason why the Id does not consistently starts from
> 'w1' ?

Yes there is, "w1" is reserved for the Display, "w2" is used by a label for
the text size determination, which does not always run (since measured text
sizes are cached).

However, you should never rely on these ids, rather assign unique ids of
your own to the tested widgets like this:

widget.setData( WidgetUtil.CUSTOM_WIDGET_ID, "myTestId-1" );

See Javadoc on WidgetUtil.CUSTOM_WIDGET_ID and the discussion on
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204859

Best Regards, Ralf
Re: Inconsistent Id Generated on HTML Component [message #72188 is a reply to message #72156] Wed, 30 January 2008 04:07 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Ralf,

> Yes there is, "w1" is reserved for the Display, "w2" is used by a label for
> the text size determination, which does not always run (since measured text
> sizes are cached).

Thanks for your clarification.

> However, you should never rely on these ids, rather assign unique ids of
> your own to the tested widgets like this:

> widget.setData( WidgetUtil.CUSTOM_WIDGET_ID, "myTestId-1" );

I'm aware of the capability to assign custom unique id, but as I
understand I can only do this on components that I myself render.
What if I need to click menus of coolbar buttons, asserting that certain
views/editors open, shouldn't I rely on this these ids ? Or is there any
way to assign custom id to these components ?

Best Regards,

Setya
Previous Topic:Progress for CellEditors?
Next Topic:Context menus for TableHeaders
Goto Forum:
  


Current Time: Fri Apr 19 23:04:38 GMT 2024

Powered by FUDForum. Page generated in 0.04418 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top