focus on a specific shell [message #9067] |
Sun, 14 December 2008 20:59  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04877 seconds