Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP, Selenium and Extension Points.
RAP, Selenium and Extension Points. [message #111317] Wed, 05 November 2008 23:03 Go to next message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
Hello group. I wonder if this issue has been discussed.

I have a mandate to create UI testing of our RAP application via Selenium.
I have made some progress and am encouraged that this can be our solution
for UI testing. When I set the property org.eclipse.rwt.enableUITests to
true, I can successfully set the data of my components, using
org.eclipse.rwt.lifecycle.WidgetUtil.CUSTOM_WIDGET_ID as the key, to
something Selenium can recognize.

The problem occurs when we use the platform provided features through the
extension points. An example is where we use the
org.eclipse.ui.file.import as a contribution from a plugin. This provides
us with a platform supplied import dialog. However, we have no way to set
the encapsulated component's data field (for example, the dialog's cancel
button), making the dialog untestable.

This is an issue that is not necessarily limited to Selenium. Without the
DIV labeling, how will RAP be testable via, say, QFTest in the future?

Please let me know your thoughts on this issue, and thanks a bunch -- Mark
Re: RAP, Selenium and Extension Points. [message #111632 is a reply to message #111317] Fri, 07 November 2008 17:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evolanakis.innoopract.com

Hi Mark,

Mark Freiheit wrote:
> provides us with a platform supplied import dialog. However, we have no
> way to set the encapsulated component's data field (for example, the
> dialog's cancel button), making the dialog untestable.

Interesting, but how would you solve this in RCP?

Personally I think there will be cases where you have UI that is
contributed by 3rd party plug-ins in binary form, and you cannot easily
do a control.setData(...) on the components.

I know that some testing frameworks have things like 'widget finders',
where you can search for a widget inside the ui tree (doing
composite.getChildren() recursively). Example: find a button with the
label 'Cancel'. This should also work in your case, but has the drawback
of being prone to break (for example when the label is changed).

Kind regards,
Elias.

PS: I would love to read a how-to style blog or wiki-entry on RAP
testing and Selenium - the page we have on the our RAP wiki
(http://wiki.eclipse.org/RapUITesting) is outdated...

--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
Re: RAP, Selenium and Extension Points. [message #111646 is a reply to message #111632] Fri, 07 November 2008 21:28 Go to previous message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
Hey Elias. Thanks for your response. Something that helped a lot was the
WidgetIdGenerator that acts as a phase listener, and injects component
names based on their hashcode. That gets us most of the way there!

The next challenge is, as you mentioned, how do we get this to work in
RCP? The goal is to have the testing be as single sourced as possible.
Hopefully we will think of a way to consistently name the components (in
RAP and RCP) to reduce our testing complexity. Alas, there is no phase
listener in RCP.

By the way, I cannot find a reasonable way of evaluating a qooxdoo div
component that is a button to determine if it is enabled or not. The only
way that has occurred to me is to get the DIV object's style attribute and
parse for the color. If it is an rgb(255,255,255), the button is enabled.
Does anyone know a better way? (Perhaps this is better posted on the
qooxdoo or Selenium sites).
Previous Topic:cannot change textboxes with Selenium
Next Topic:Selection event firing problem
Goto Forum:
  


Current Time: Sat Feb 04 22:30:14 GMT 2023

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

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

Back to the top