Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Assigning value to ID attribute to rendered html components
Assigning value to ID attribute to rendered html components [message #42189] Mon, 20 August 2007 12:38 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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
Re: Assigning value to ID attribute to rendered html components [message #43452 is a reply to message #42279] Tue, 28 August 2007 04:52 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Benny,

To fully embrace automatic testing, instead of starting Selenium Server
manually I have put code to start it programmatically in the test fixture.
I also want to do the same on the OSGI Service that host my RAP
application.

Do you have any idea how to do this ?

Thanks in advance.

Best Regards,

Setya
Previous Topic:M6 released
Next Topic:static methods from image
Goto Forum:
  


Current Time: Sat Jun 10 22:48:56 GMT 2023

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

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

Back to the top