Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 375246

Summary: Can't set custom widget id's
Product: [RT] RAP Reporter: Thomas Kratz <eiswind>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: ronald.so
Version: 1.5   
Target Milestone: 1.5 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
firebug inspection of the button none

Description Thomas Kratz CLA 2012-03-24 07:51:48 EDT
Build Identifier: nightly from 20120312

Hi I tried to explore Selenium Testing as explained on RapUiTesting. With the 1.5 nightly I have if I enable ui testing I can see the generated ids wXX but the button I set my custom id on has no id at all. Am I getting something wrong or is this a bug in 1.5?


Reproducible: Always

Steps to Reproduce:
1. enable ui testing
2. set custom widget id on a button in a form
3. button doesnt have an id
Comment 1 Thomas Kratz CLA 2012-03-24 07:52:31 EDT
Created attachment 213138 [details]
firebug inspection of the button
Comment 2 Thomas Kratz CLA 2012-03-24 07:56:51 EDT
I even found the UI beeing completely disfunctional with ui testing enabled. key listener and button click don't work.
Comment 3 Ivan Furnadjiev CLA 2012-03-26 09:21:53 EDT
Just tested with Controls Demo and HTML id attributes are rendered when UITests are enabled. 
(In reply to comment #2)
> I even found the UI beeing completely disfunctional with ui testing enabled. key
> listener and button click don't work.
For me it's working fine. Tested in Firefox 11 and Chrome. Which browser are you using?
Nevertheless, I can confirm that the CUSTOM WIDGET ID is not rendered. With the latest refactorings in ClientObjectFactory class, the id is taken from the adapter directly, but the logic which deals with the custom widget id is in WidgetUtil#getId.
Comment 4 Thomas Kratz CLA 2012-03-26 09:26:16 EDT
Hi Ivan,

I was testing with firefox 11 and chrome. the ui beeing disfunctional is something I experienced multiple times even without ui testing enabled on saturday. But I cannot reproduce it, so I have to see if it happens again.

Does it make sense at all to build selenium tests then ?
Comment 5 Ivan Furnadjiev CLA 2012-03-26 09:34:17 EDT
As this is a regression, I marked this bug as P2 (to be fixed in this release). Probably, 1.5M5 is not affected.
Comment 6 Ivan Furnadjiev CLA 2012-03-27 04:32:27 EDT
Fixed as suggested by Ruediger in the WidgetUtil#getId comment. Custom id is now handled in the Widget#setData. The check for invalid custom id is done in the WidgetAdapter#setCustomId. If custom id is set after the widget is initialized, an IllegalStateException is thrown.