Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to get texts inside Shell ???(Texts and Labels in Shell and DialogMessage)
How to get texts inside Shell ??? [message #541794] Tue, 22 June 2010 14:27 Go to next message
Caio Bulgarelli is currently offline Caio BulgarelliFriend
Messages: 16
Registered: February 2010
Junior Member
I would like to know, how can I get the text on top of Shell ?

I need to develop a TestCase that capture the messages (the alert texts) inside the Shell.

Like this,
Example 1:

http://i752.photobucket.com/albums/xx163/caiob3/shell_textMessage_0001.jpg

Example 2:

http://i752.photobucket.com/albums/xx163/caiob3/shell_textMessage_0002.jpg


Tks

Re: How to get texts inside Shell ??? [message #541903 is a reply to message #541794] Wed, 23 June 2010 05:55 Go to previous messageGo to next message
ashitha shetty is currently offline ashitha shettyFriend
Messages: 17
Registered: March 2010
Junior Member
Hi Caio,

This will answer your question: http:// www.eclipse.org/forums/index.php?t=msg&th=152135&sta rt=0&

Regards,
Ashitha.
Re: How to get texts inside Shell ??? [message #542414 is a reply to message #541903] Thu, 24 June 2010 18:20 Go to previous messageGo to next message
Caio Bulgarelli is currently offline Caio BulgarelliFriend
Messages: 16
Registered: February 2010
Junior Member
OK !!!

It worked! Thanks...


But... this works when I already know what message will appears.

Fine!

However... How Can I capture a unknow message? I mean... a "dynamic" message?

Like this (EXAMPLE)

String s = bot.shel("NAME_of_SHELL").get????.getText();

Is it possible?
Re: How to get texts inside Shell ??? [message #542426 is a reply to message #542414] Thu, 24 June 2010 18:43 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
If the message is displayed in a label:

String message = bot.shell("Shell title").label().getText();

If the label is not the first label in the shell, you may need to
provide additional information to find the label:

label(index) or labelInGroup()

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

On 6/24/10 11:20 AM, Caio Bulgarelli wrote:
> OK !!!
>
> It worked! Thanks...
>
>
> But... this works when I already know what message will appears.
>
> Fine!
>
> However... How Can I capture a unknow message? I mean... a "dynamic"
> message?
>
> Like this (EXAMPLE)
>
> String s = bot.shel("NAME_of_SHELL").get????.getText();
>
> Is it possible?
Previous Topic:SWTBot + Selenium for SWT & browser testing?
Next Topic:SWTBOT RCP 3.12
Goto Forum:
  


Current Time: Sun Dec 21 10:53:30 GMT 2014

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

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