Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to access UI item from running application(Application is webstart. Need to get the UI test on the application)
How to access UI item from running application [message #532776] Tue, 11 May 2010 04:29 Go to next message
Rohith  is currently offline Rohith
Messages: 2
Registered: May 2010
Junior Member
Hello All,

I am a newbie to SWTBOT and eclipse. The application I am testing is in WebStart. So, I need to download the components on to the machine and start running the automated tests.

Could any one please let me know how do I get hold of the Application which is running and access all the UI elements. I did not find any article which talked about how to get hold of application which is running.

Thanks in advance.
Re: How to access UI item from running application [message #532900 is a reply to message #532776] Tue, 11 May 2010 09:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Using SWTBot to test a webstart application? That's the first time in 3
years I've seen someone do this!

I believe webstart has a main() method on it, and packaged as a jar with
a special manifest.

Testing plain swt apps with SWTBot is a bit of a PITA. Getting a stub
framework setup that can run the application is a bit tricky. Basically
you'll need to create a (background) thread and run the application on
that thread. Run the tests as regular junit tests.

To understand what that means, you'll need to checkout the source and
look at the AbstractSWTTestCase[1] class and tests classes in
org.eclipse.swtbot.swt.finder.alltests[2].

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

[1] - http://goo.gl/KOuA
[2] - http://goo.gl/sLtH

On 5/11/10 1:29 AM, Rohith wrote:
> Hello All,
>
> I am a newbie to SWTBOT and eclipse. The application I am testing is in
> WebStart. So, I need to download the components on to the machine and
> start running the automated tests.
> Could any one please let me know how do I get hold of the Application
> which is running and access all the UI elements. I did not find any
> article which talked about how to get hold of application which is running.
> Thanks in advance.
Re: How to access UI item from running application [message #533293 is a reply to message #532900] Thu, 13 May 2010 01:01 Go to previous messageGo to next message
Rohith  is currently offline Rohith
Messages: 2
Registered: May 2010
Junior Member
Hello Ketan,

I just wanted one more clarification on SWTBOT. Say that, I just
have the exe of the SWT java application, can I run the SWTBOT tests on that application? Is there a way I can search for the window and hook on that and access the UI elements under that.


Rohith
Re: How to access UI item from running application [message #533301 is a reply to message #533293] Thu, 13 May 2010 02:02 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
You'd at the very least need a jar file with a main class. Anything
short and you're probably looking at buying a commercial tool.

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 5/12/10 10:01 PM, Rohith wrote:
> Hello Ketan,
>
> I just wanted one more clarification on SWTBOT. Say that, I just
> have the exe of the SWT java application, can I run the SWTBOT tests on
> that application? Is there a way I can search for the window and hook on
> that and access the UI elements under that.
>
>
> Rohith
Previous Topic:Waiting for workspace in SWTBotTest
Next Topic:Selection in TableViewer
Goto Forum:
  


Current Time: Fri Aug 29 12:23:30 EDT 2014

Powered by FUDForum. Page generated in 0.01687 seconds