Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » focus on a specific shell
focus on a specific shell [message #9067] Sun, 14 December 2008 20:59 Go to next message
Brice Laurel is currently offline Brice LaurelFriend
Messages: 72
Registered: July 2009
Member
Hi list,

I write test for my rcp application. In test, I open many shell, and do
action on them. But I have one shell which the instruction
(bot.activeShell().activate()) don't get me the focus on them. Someone
says what is the possible problems???

Thanks in avance.
Re: focus on a specific shell [message #9109 is a reply to message #9067] Sun, 14 December 2008 21:50 Go to previous messageGo to next message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
Member
What is the error that you get? You should enable logging, if not
enabled, to better understand what is happening.

In any case, why would you want to active an active shell? What is your
goal in trying to do this?

Brice Laurel wrote:

> Hi list,

> I write test for my rcp application. In test, I open many shell, and do
> action on them. But I have one shell which the instruction
> (bot.activeShell().activate()) don't get me the focus on them. Someone
> says what is the possible problems???

> Thanks in avance.
Re: focus on a specific shell [message #10231 is a reply to message #9109] Mon, 15 December 2008 16:41 Go to previous messageGo to next message
Brice Laurel is currently offline Brice LaurelFriend
Messages: 72
Registered: July 2009
Member
Hi Ketan Patel,

I enable log and I have this on the console


Enquing event SelectionEvent {type=0 Button {*Wrong Thread*}
time=989604101 data=null x=0 y=0 width=0 height=0 detail=0} on Button
{&Finish}

Sending event SelectionEvent {type=0 Button {*Wrong Thread*}
time=989604101 data=null x=0 y=0 width=0 height=0 detail=0} to Button
{&Finish}
notifyChanged!!
ResourceloadedListener handleNotification

Sent event SelectionEvent {type=0 Button {*Wrong Thread*} time=989604101
data=null x=0 y=0 width=0 height=0 detail=0} to Button {*Disposed*}


But I don't know how I can solve the problem.

Thanks in avance.
Re: focus on a specific shell [message #10296 is a reply to message #10231] Mon, 15 December 2008 20:24 Go to previous messageGo to next message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
Member
The problem is that something is trying to select a button that is
disposed:

Sent event SelectionEvent {type=0 Button {*Wrong Thread*} time=989604101
data=null x=0 y=0 width=0 height=0 detail=0} to Button {*Disposed*}

Can you check and see what your code is doing around that time? Or post
the code here.

Brice Laurel wrote:

> Hi Ketan Patel,

> I enable log and I have this on the console


> Enquing event SelectionEvent {type=0 Button {*Wrong Thread*}
> time=989604101 data=null x=0 y=0 width=0 height=0 detail=0} on Button
> {&Finish}

> Sending event SelectionEvent {type=0 Button {*Wrong Thread*}
> time=989604101 data=null x=0 y=0 width=0 height=0 detail=0} to Button
> {&Finish}
> notifyChanged!!
> ResourceloadedListener handleNotification

> Sent event SelectionEvent {type=0 Button {*Wrong Thread*} time=989604101
> data=null x=0 y=0 width=0 height=0 detail=0} to Button {*Disposed*}


> But I don't know how I can solve the problem.

> Thanks in avance.
Re: focus on a specific shell [message #10361 is a reply to message #10296] Tue, 16 December 2008 13:41 Go to previous messageGo to next message
Brice Laurel is currently offline Brice LaurelFriend
Messages: 72
Registered: July 2009
Member
Hi Ketan Patel,

My code is below.

public void testMyRCP() throws Exception{

(1) bot.menu("File").menu("New").menu("Model").click();
(2) bot.textWithLabel("Name:").setText("myModel");
(3) bot.menu("Finish").click();
(4) bot.button("Continue").click();
}


(1) This instruction open shell with title "New Model", on this shell (2)
I type text "myModel" in a text and (3) I click on button "Finish", then
another shell will open
(4) when I click on button "Continue", nothing is do. And the the test
stay on this shell. I don't understand how?

Thanks in advance
Re: focus on a specific shell [message #10394 is a reply to message #10361] Tue, 16 December 2008 14:08 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Brice Laurel a écrit :
> Hi Ketan Patel,
>
> My code is below.
>
> public void testMyRCP() throws Exception{
>
> (1) bot.menu("File").menu("New").menu("Model").click();
> (2) bot.textWithLabel("Name:").setText("myModel");
> (3) bot.menu("Finish").click();

bot.waitUntil(Conditions.shellIsActive("shell"), bot.DEFAULT_TIMEOUT);

> (4) bot.button("Continue").click();
> }
>
>
> (1) This instruction open shell with title "New Model", on this shell
> (2) I type text "myModel" in a text and (3) I click on button "Finish",
> then another shell will open
> (4) when I click on button "Continue", nothing is do. And the the test
> stay on this shell. I don't understand how?

The bot is too quick and doesn't wait for the Finish action to be
finished...

--
Cordialement

Vincent MAHÉ

Ingénieur Plate-forme OpenEmbeDD - http://openembedd.org
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 71 00, Fax: +33 (0) 2 99 84 71 71
Re: focus on a specific shell [message #10426 is a reply to message #10394] Tue, 16 December 2008 15:35 Go to previous messageGo to next message
Brice Laurel is currently offline Brice LaurelFriend
Messages: 72
Registered: July 2009
Member
Hi Vincent,

I execute the following code

bot.menu("File").menu("New").menu("model").click();
bot.textWithLabel("Name:").setText("myModel");
bot.button("Finish").click();
bot.waitUntil(Conditions.shellIsActive(""), SWTEclipseBot.DEFAULT_TIMEOUT);
bot.activeShell().close();

But I have the same problem.

Thanks in advance
Re: focus on a specific shell [message #10459 is a reply to message #10361] Tue, 16 December 2008 15:51 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
The test would have captured a screenshot at the point of failure. You
should find the screenshot in the screenshots directory with the name of
the test that failed.

The problem I see could mostly be of the the following:
1. The previous shell did not close
2. The new shell did not open

-- Ketan

On 16/12/08 19:11, Brice Laurel wrote:
> Hi Ketan Patel,
>
> My code is below.
>
> public void testMyRCP() throws Exception{
>
> (1) bot.menu("File").menu("New").menu("Model").click();
> (2) bot.textWithLabel("Name:").setText("myModel");
> (3) bot.menu("Finish").click();
> (4) bot.button("Continue").click();
> }
>
>
> (1) This instruction open shell with title "New Model", on this shell
> (2) I type text "myModel" in a text and (3) I click on button "Finish",
> then another shell will open
> (4) when I click on button "Continue", nothing is do. And the the test
> stay on this shell. I don't understand how?
>
> Thanks in advance
>
Re: focus on a specific shell [message #10556 is a reply to message #10459] Wed, 17 December 2008 00:02 Go to previous message
Ketan Patel is currently offline Ketan PatelFriend
Messages: 68
Registered: July 2009
Member
I agree here. What you might and will have to do is wait for the new
shell to open, but screenshot will help determine that.
Previous Topic:click in an editor
Next Topic:Please file all bugs on bugs.eclipse.org
Goto Forum:
  


Current Time: Sat Dec 21 16:56:35 GMT 2024

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

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

Back to the top