Chen, Min | 4 Mar 20:32 2008
Picon

Random Problem in clicking File menu item using abbot.swt on Windows XP

Hi there,

 

            I am using abbot.swt to test our eclipse plugin application, but I am running into some random problems in clicking menu item in Windows XP mostly. In testcases, I am intended to use menuItemTester.actionSelectMenuItem to select File->New menu item, but sometimes it will click a little bit off and open Shell menu (Restore, Minimum, Maximum, Close). Also this only happens quite often on Windows XP. Does anyone encounter the similar problem out there? And how to fix this? Thanks.

 

            -min

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
Gary Johnston | 4 Mar 21:22 2008
Picon

Re: Random Problem in clicking File menu item using abbot.swt on Windows XP


The actionSelectMenuItem methods are deprecated (although that's no reason they shouldn't work).  Try one of the actionClickItem variants.  We use those and haven't been having any problems like you mention.
- Gary
Gary Johnston
Team Lead, Web Diagram Editor, Struts Tools
Rational Application Developer Development




"Chen, Min" <Min_Chen <at> bmc.com>
Sent by: abbot-users-bounces <at> lists.sourceforge.net

03/04/2008 02:32 PM

To
<abbot-users <at> lists.sourceforge.net>
cc
Subject
[abbot-users] Random Problem in clicking File menu item using        abbot.swt on Windows XP





Hi there,
 
            I am using abbot.swt to test our eclipse plugin application, but I am running into some random problems in clicking menu item in Windows XP mostly. In testcases, I am intended to use menuItemTester.actionSelectMenuItem to select File->New menu item, but sometimes it will click a little bit off and open Shell menu (Restore, Minimum, Maximum, Close). Also this only happens quite often on Windows XP. Does anyone encounter the similar problem out there? And how to fix this? Thanks.
 
            -min-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
Timothy Wall | 6 Mar 13:22 2008
Picon

Re: Cannot run new Abbot release

Use java -jar costello.jar instead.

There's probably some documentation that missed getting this updated.

The scripting has been split from the event generation.

On Mar 6, 2008, at 6:51 AM, Олег Петров wrote:

> Hello Timothy,
>
> First of all, I want to thank you for your work on Abbot, it is really
> great and helps me a lot!
> Unfortunately, I failed to run the latest release (abbot-1.0.1.zip).
> Running it with
>   java -jar abbot.jar
> gives me
>   Failed to load Main-Class manifest attribute from
>   labbot.jar
>
> Looks like abbot.editor.Costello is not included into final
> distribution, although in 1.0.0.rc5 it was.
>
> -- 
> Best regards,
>    Oleg.

Timothy Wall
http://abbot.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
Timothy Wall | 6 Mar 15:09 2008
Picon

Re: Cannot run new Abbot release

Thanks for catching that.  I've updated the archives to include  
costello.jar; the build script had missed getting updated in a few  
places.

On Mar 6, 2008, at 7:30 AM, Олег Петров wrote:

> Looks like costello.jar is not available.
> ~/distr/abbot/abbot-1.0.1$ find . -name abbot.jar
> ./lib/abbot.jar
> ~/distr/abbot/abbot-1.0.1$ find . -name costello.jar
> ~/distr/abbot/abbot-1.0.1$
>
> On Thu, Mar 6, 2008 at 3:22 PM, Timothy Wall <twall <at> users.sf.net>  
> wrote:
>> Use java -jar costello.jar instead.
>>
>> There's probably some documentation that missed getting this updated.
>>
>> The scripting has been split from the event generation.
>>
>>
>>
>> On Mar 6, 2008, at 6:51 AM, Олег Петров wrote:
>>
>>> Hello Timothy,
>>>
>>> First of all, I want to thank you for your work on Abbot, it is  
>>> really
>>> great and helps me a lot!
>>> Unfortunately, I failed to run the latest release (abbot-1.0.1.zip).
>>> Running it with
>>>  java -jar abbot.jar
>>> gives me
>>>  Failed to load Main-Class manifest attribute from
>>>  labbot.jar
>>>
>>> Looks like abbot.editor.Costello is not included into final
>>> distribution, although in 1.0.0.rc5 it was.
>>>
>>> --
>>> Best regards,
>>>   Oleg.
>>
>> Timothy Wall
>> http://abbot.sf.net
>>
>>
>>
>
>
>
> -- 
> Best regards,
>    Oleg.

Timothy Wall
http://abbot.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users
Sandro | 9 Mar 17:23 2008
Picon

swiss german keyboard issues with official abbot.SWT release

Hi folks

We use abbot.SWT for 1.5 Years in our Project, we had some problem with 
it but since it didn't have an officiel release we fixed all the bugs 
directly in the code. But now abbot.SWT has it own release and we would 
like to use it. The Problem is  that we have a swisss german keyboard 
and all of our keyboard tests doesn't work anymore. To map the special 
charactes which needs a key combination we implemented something like this:

Util-Class:
//Map<CharacterWeWoulrLike, CharacterWeHaveToEnter>
   sSwissGermanCharacterMap = new HashMap<Character, SpecialKeyStroke>();
   sSwissGermanCharacterMap.put('\\', new SpecialKeyStroke('<', 
(SWT.CTRL | SWT.ALT)));
   sSwissGermanCharacterMap.put(' <at> ', new SpecialKeyStroke('2', (SWT.CTRL 
| SWT.ALT)));

And SpecialKeyStorek-Class:
 public SpecialKeyStroke(char key, int modifier) {
   fKey = key;
   fModifier = modifier;
 }

 public void enter(WidgetTester tester) {
   tester.keyPress(fModifier);
   try {
     tester.actionKeyString(fKey);
   } finally {
     tester.keyRelease(fModifier);
   }
 }

But in this release the method keyPress and keyRelease are private. And 
the Robot.unshifted(char) method is very wrong for our swiss german 
keyboard. So my question is, how can I make our keyboards tests green 
again? IMHO the method "unshifted" needs to be protected...

Best regards
Sandro

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Andrew Nelson | 13 Mar 21:27 2008
Picon

How to use AWTHierarchy/TestHierarchy

All,

I'm trying to create some code that wraps Abbot with a simple DSL. 
Everything works but I'm having a really hard time getting the 
TestHierarchy to consistently find windows.

Note if I switch to use AWTHierarchy I seem to find components more 
consistently, but I can't reuse the hierarchy in following tests.

What steps does one need to take during test setup and tear down to be 
sure the hierarchy is correctly instantiated and correctly cleaned up so 
it is ready for use in the next test?

Should I be using AWTHierarchy or TestHierarchy?

Thanks,

//andy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Timothy Wall | 13 Mar 22:41 2008
Picon

Re: How to use AWTHierarchy/TestHierarchy

TestHierarchy ignores any extant components at the time of creation.   
Basically create one at the start of your test, assuming you create  
your UI sometime thereafter.

AWTHierarchy does no filtering.

There is a "filterComponent" method (or something like that) which  
tells the Hierarchy to no longer include a given component or its  
descendants in the hierarchy.

Depending on how you intend to use it, you may need to derive from one  
or the other.

On Mar 13, 2008, at 4:27 PM, Andrew Nelson wrote:

> All,
>
> I'm trying to create some code that wraps Abbot with a simple DSL.
> Everything works but I'm having a really hard time getting the
> TestHierarchy to consistently find windows.
>
> Note if I switch to use AWTHierarchy I seem to find components more
> consistently, but I can't reuse the hierarchy in following tests.
>
> What steps does one need to take during test setup and tear down to be
> sure the hierarchy is correctly instantiated and correctly cleaned  
> up so
> it is ready for use in the next test?
>
> Should I be using AWTHierarchy or TestHierarchy?
>
> Thanks,
>
> //andy
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> abbot-users mailing list
> abbot-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/abbot-users

Timothy Wall
http://abbot.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Andrew Nelson | 14 Mar 19:11 2008
Picon

scrollToVisible ?

All,

Still working on my DSL for abbot and I've run into another problem.

When I say something like:

new JComponentTester.actionClick(location) with a component wrapped in a 
JScrollPane, I'm rather inconsistently getting the following error.

Could not make visible by scrolling the point (175,175) on 
org.robotery.acceptance.component.SimpleComponent[component,-104,-124,500x500,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=500,height=500]]

abbot.tester.ActionFailedException: Could not make visible by scrolling 
the point (175,175) on 
org.robotery.acceptance.component.SimpleComponent[component,-104,-124,500x500,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=500,height=500]]
at abbot.tester.JComponentTester.scrollToVisible(JComponentTester.java:179)
at abbot.tester.JComponentTester.actionClick(JComponentTester.java:70)
at abbot.tester.ComponentTester.actionClick(ComponentTester.java:632)
at abbot.tester.ComponentTester.actionClick(ComponentTester.java:618)
at org.robotery.BaseJComponentContext$4.run(BaseJComponentContext.java:87)
at org.robotery.Plan.run(Plan.java:320)
at org.robotery.Robotery.perform(Robotery.java:38)
at 
org.robotery.acceptance.component.TestScrollPane.rightClickShouldScrollAsNeeded(TestScrollPane.java:115)

Can anyone give me any hints regarding why this would happen.  If I 
looked through the applicable code I see the logic goes as follows.

Try to scroll to the visible section.
check to see if the visible section was made visible
if not throw exception.

I just don't understand why JComponent.scrollRectToVisible would fail 
like this.

Thanks,

//andy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Timothy Wall | 14 Mar 19:32 2008
Picon

Re: scrollToVisible ?


On Mar 14, 2008, at 2:11 PM, Andrew Nelson wrote:

> When I say something like:
>
> new JComponentTester.actionClick(location) with a component wrapped  
> in a
> JScrollPane, I'm rather inconsistently getting the following error.
>
> Could not make visible by scrolling the point (175,175) on
> org 
> .robotery 
> .acceptance 
> .component 
> .SimpleComponent 
> [component 
> ,-104 
> ,-124,500x500 
> ,alignmentX 
> = 
> 0.0 
> ,alignmentY 
> = 
> 0.0 
> ,border 
> = 
> ,flags 
> = 
> 0 
> ,maximumSize 
> =,minimumSize=,preferredSize=java.awt.Dimension[width=500,height=500]]

Are your scrollbars visible and enabled?  Is the component moved on  
scrollRectToVisible?  If the component isn't moved, then the problem  
is in the component or its hierarchy.

If it *is* moved, then something is wrong with reading back its new  
location.

>
> Can anyone give me any hints regarding why this would happen.  If I
> looked through the applicable code I see the logic goes as follows.
>
> Try to scroll to the visible section.
> check to see if the visible section was made visible
> if not throw exception.
>
> I just don't understand why JComponent.scrollRectToVisible would fail
> like this.
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Timothy Wall | 17 Mar 14:56 2008
Picon

Re: How can I perform Double Click on a component

Read the JavaDoc for ComponentTester.actionClick.  There are method  
variations that let you set the number of clicks, the button mask, et  
al.

On Mar 17, 2008, at 8:12 AM, ranjith kumar wrote:

>
> I need help to perform double click on a component,
>
> As part of my test cases i want to perform double click action on a  
> component, is there any method to perform this action, if it is  
> available, what are the parameters for that method, please help me  
> on this
>

Timothy Wall
http://abbot.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane