Hi Christian.

You should take a look at the SWTBot Generator.  It records actions and 
generates a little script to replay the actions.  But the script is really 
oriented towards testing and not for UI automation — it deals in absolute 
actions (e.g., set the content of the text widget to this string, switch to the 
part named ‘x’) rather than relative actions (insert this text, go the n-th 
last editor).

Although I’m sure I could have extended its Generator to record keystrokes, the 
real problem that makes keyboard macros difficult is that the application must 
behave in a very deterministic fashion.  Otherwise the macro you just recorded 
may end up causing information loss.  Here are some examples:
Open Type (Ctrl-Shift-T) highlights recently opened types at the top, so the 
user hitting arrow-down several times may not select the right file.  Ctrl-E 
(the opened-files drop-down) is sorted in MRU.
There is ambiguity in a number of actions.  Does the user hitting Ctrl-F6 (show 
previous editor) want to go to the previously selected editor (relative), or to 
*that* particular editor (absolute)?  (SWTBot’s Generator uses the latter 
interpretation.)
The user keys ‘.’ in a Java editor, bringing up Content Assist, but the results 
are entirely contextual.  During recording, the position may be a field, but on 
replay the position may be within a method.  Or perhaps they’re using Code 
Recommenders, where the order of the elements is even less deterministic.
The user clicks in a text editor.  Was the user trying to set the cursor to 
that element?  Or to that relative position?  Was the intention for this 
particular editor, or because it was the most recently used editor?
I discovered early on that I needed to tie keystrokes back to the corresponding 
Eclipse command so as to be able to blacklist commands that are ambiguous in 
the users intention from an automation perspective.  And I needed to provide 
facilities for disabling certain behaviours during macro recording and playback 
(e.g., to disable content-assist).  And disable most mouse actions, since they 
introduce ambiguity.

Brian.

> On 15-Jun-2015, at 1:51 PM, Lars Vogel <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> Hi Christian,
> 
> SWTBot has already a UI recorder. See 
> https://wiki.eclipse.org/SWTBot/Generator 
> <https://wiki.eclipse.org/SWTBot/Generator>.
> 
> Adding Mickael to the email thread as SWTBot Lead he has more insights.
> 
> Best regards, Lars
> 
> On Mon, Jun 15, 2015 at 7:44 PM, Christian Pontesegger 
> <[email protected]> wrote:
> Hi Biran,
> 
> very interesting stuff. I always thought of getting a closer look into SWT 
> Bot for UI event recording. In the end I would like to create a real recorder 
> for EASE that allows to record all keyboard and mouse events and allows to 
> replay them. Keyboard recording seems to be one step in that direction. Are 
> you interested in working on such a full recorder?
> 
> Christian
> 
> 
> 
> On 15.06.2015 03:28, Brian de Alwis wrote:
>> I’ve submitted a first cut to provide keyboard macros (bug 8519) to the e4 
>> incubator.  It can be installed by using Help > Install New Software from 
>> 
>>     http://download.eclipse.org/e4/snapshots/org.eclipse.e4.ui/
>> 
>> under the Macros section.  The implementation is specific to the Eclipse 4.x 
>> stream and has only been tested with 4.5 (Mars).  There's some documentation 
>> at:
>> 
>>     https://wiki.eclipse.org/E4/Macros
>> 
>> Brian.
>> 
>> 
>> _______________________________________________
>> e4-dev mailing list
>> 
>> [email protected]
>> 
>> To change your delivery options, retrieve your password, or unsubscribe from 
>> this list, visit
>> 
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> 
> _______________________________________________
> e4-dev mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> 
> 
> -- 
> Geschäftsführer
> 
> vogella GmbH
> 
> Haindaalwisch 17a, 22395 Hamburg
> Amtsgericht Hamburg: HRB 127058
> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
> USt-IdNr.: DE284122352
> Fax (032) 221739404, Email: [email protected], Web: 
> http://www.vogella.com
> _______________________________________________
> e4-dev mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/e4-dev

_______________________________________________
e4-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to