Assigning value to ID attribute to rendered html components [message #42189] |
Mon, 20 August 2007 12:38  |
|
Hi,
For the testing framework (Selenium) to be able to find HTML components in
the browser, one can assign unique value to ID attribute to the HTML
component (the alternative is using XPath, how can I do this through RAP
widget so that the resultant HTML component has their ID set ?
Any help would be greatly appreciated.
Best Regards,
Setya
|
|
|
Re: Assigning value to ID attribute to rendered html components [message #42279 is a reply to message #42189] |
Mon, 20 August 2007 18:08   |
Eclipse User |
|
|
|
Originally posted by: b.muskalla.gmx.net
Hi Setya,
I played around with RAP and Selenium awhile ago. I got to a point where
I can test a RAP application with JUnit tests based on Selenium.
BUT there is a major drawback in my current approach: You need to define
the id for every widget you can get by looking at the XHR responses of
your application. Also these ids can dramatically change due
circumstances like the widgets created before or the way you go trough
your application.
I put together a wiki page how to test RAP applications with this
approach. See http://wiki.eclipse.org/RapUITesting
There is a nice idea of identifiying widgets with a xpath-expression
like /shell[@active]/button[2] but we need to tweak RWT a little but to
make this happen (and also need a rap-specific selenium user extension).
But I really don't know if we have the time to adress this before the
1.0 release :(
If you're interested in this topic, we're happy about any contribution
or idea in this area.
Hope that helps a little bit
Benny
Setya wrote:
> Hi,
>
> For the testing framework (Selenium) to be able to find HTML components
> in the browser, one can assign unique value to ID attribute to the HTML
> component (the alternative is using XPath, how can I do this through RAP
> widget so that the resultant HTML component has their ID set ?
>
> Any help would be greatly appreciated.
>
>
> Best Regards,
>
> Setya
>
|
|
|
Re: Assigning value to ID attribute to rendered html components [message #42343 is a reply to message #42279] |
Tue, 21 August 2007 03:08   |
|
Benny,
> I put together a wiki page how to test RAP applications with this
> approach. See http://wiki.eclipse.org/RapUITesting
Thank you very much for this.
> There is a nice idea of identifiying widgets with a xpath-expression
> like /shell[@active]/button[2] but we need to tweak RWT a little but to
> make this happen (and also need a rap-specific selenium user extension).
Yes, XPath is another way to find components, but I've heard that this is
not browser compatible approach.
Best Regards,
Setya
|
|
|
|
Powered by
FUDForum. Page generated in 0.02012 seconds