Problem clicking context menu item [message #662882] |
Fri, 01 April 2011 11:28 |
manasa Messages: 32 Registered: October 2010 |
Member |
|
|
Hi All,
I am new to SWTBot, and I am trying to get one scenario running.
I want to click on a context menu item in my view, and want to uncheck the item, so that there is no checked option against it, something very similar to Project - >Build Automatically option in the eclipse main menu.
I try the following code and i see that though it finds the item and clicks, but my context menu does not get unchecked.
bot.viewByTitle("Index View").menu("EObject Table").click();
Can anyone point out what is the mistake above or how can I check/uncheck a context menu, any other ways to achieve the same.
Thanks in advance,
Regards,
Manasa
|
|
|
Re: Problem clicking context menu item [message #662936 is a reply to message #662882] |
Fri, 01 April 2011 14:10 |
Eclipse User |
|
|
|
Originally posted by: david.landry.gmail.com
manasa wrote:
> Hi All,
>
> I am new to SWTBot, and I am trying to get one scenario running.
>
> I want to click on a context menu item in my view, and want to uncheck
> the item, so that there is no checked option against it, something very
> similar to Project - >Build Automatically option in the eclipse main menu.
>
> I try the following code and i see that though it finds the item and
> clicks, but my context menu does not get unchecked.
>
>
> bot.viewByTitle("Index View").menu("EObject Table").click();
>
>
> Can anyone point out what is the mistake above or how can I
> check/uncheck a context menu, any other ways to achieve the same.
> Thanks in advance,
>
> Regards,
> Manasa
New to this myself so not sure if I can help or hinder you, but I'll try:
First, are you talking about a contextMenu or a menu item? There is a
difference, and SWTBot has a separate class for those.
From your description it sounds as though it is a standard menu item,
and like the "build automatically" option it may require you explicity
specify the index.
try "bot.viewByTitle("Index View").menu("EObject Table",1).click();
|
|
|
|
Powered by
FUDForum. Page generated in 0.03287 seconds