You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2009/09/23 09:34:18 UTC

Scripting Pivot from outside

Hi to all,
an idea to discuss with all the team ... what do you think on the
ability for Pivot Applications / Applets to be scripted from the
outside world ?

I'm thinking on something like Macros in Office and other programs ...
for example the ability to sent pivot the same events that usually are
sent inside the application/applet with keyboard and mouse. Like set
focus to an element, select an element in a list or in a menu, set
text in a field, etc ... and maybe also simulate mouse clicks at some
positions.

This could be very useful for automatic testing, there are some
applications that works in this way (i think FEST but I'm not sure it
works in this way :-) , or others). And also for testing performances
of applications without (real) user interaction.

In browser we can script if with Javascript, from the Browser, ok ...
but i don't know if we can do all these things.
And for Applications ?

My trouble here is to verify the infrastructure needed for this, if
it's already in Pivot, or if something has to be added/modified (if we
think it's useful).
Then, a test / tutorial could be interesting.

Add in JIRA (for the 1.5) ?

Comments ?


Thanks,
Sandro

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
You should be able to refer to any Java class from within JS. The JS  
engine automatically provides the wrappers.

On Sep 25, 2009, at 8:39 AM, Sandro Martini wrote:

> Ok, I'll try, but don't know if Robot is callable from the Javascript
> engine ... or if a wrapper is needed.
>
> I'll try and say something ...
>
> Bye,
> Sandro


Re: Scripting Pivot from outside

Posted by Sandro Martini <sa...@gmail.com>.
Ok, I'll try, but don't know if Robot is callable from the Javascript
engine ... or if a wrapper is needed.

I'll try and say something ...

Bye,
Sandro

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
Yeah - Robot is the way to go for low-level events like keyboard and  
mouse. For semantic events, you can just invoke the appropriate Pivot  
API methods.

On Sep 25, 2009, at 6:42 AM, Todd Volkert wrote:

> Again, I'd use java.awt.Robot for that.  It defines keyPress() and
> keyRelease().
>
> -T
>
> On Fri, Sep 25, 2009 at 6:37 AM, Sandro Martini <sandro.martini@gmail.com 
> >wrote:
>
>> Hi Greg,
>> thanks for having already implemented this feature, i hope to find
>> some time soon to try it !!
>>
>> Only one question, on this:
>> do you think it's possible from an "automation client" (for example  
>> in
>> Javascript, and for simplicity running in the same process) to send
>> also other events, like keystrokes combinations (and maybe but for me
>> this is not important, also mouse events), let Pivot consume and use
>> (as the usual way) them ?
>>
>> This could be useful in testing applications, to ensure for example
>> that the expected shortcuts have been defined and are working goos.
>>
>>
>> Thanks,
>> Sandro
>>


Re: Scripting Pivot from outside

Posted by Todd Volkert <tv...@gmail.com>.
Again, I'd use java.awt.Robot for that.  It defines keyPress() and
keyRelease().

-T

On Fri, Sep 25, 2009 at 6:37 AM, Sandro Martini <sa...@gmail.com>wrote:

> Hi Greg,
> thanks for having already implemented this feature, i hope to find
> some time soon to try it !!
>
> Only one question, on this:
> do you think it's possible from an "automation client" (for example in
> Javascript, and for simplicity running in the same process) to send
> also other events, like keystrokes combinations (and maybe but for me
> this is not important, also mouse events), let Pivot consume and use
> (as the usual way) them ?
>
> This could be useful in testing applications, to ensure for example
> that the expected shortcuts have been defined and are working goos.
>
>
> Thanks,
> Sandro
>

Re: Scripting Pivot from outside

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
thanks for having already implemented this feature, i hope to find
some time soon to try it !!

Only one question, on this:
do you think it's possible from an "automation client" (for example in
Javascript, and for simplicity running in the same process) to send
also other events, like keystrokes combinations (and maybe but for me
this is not important, also mouse events), let Pivot consume and use
(as the usual way) them ?

This could be useful in testing applications, to ensure for example
that the expected shortcuts have been defined and are working goos.


Thanks,
Sandro

Re: Scripting Pivot from outside

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,

>> I've seen that Greg has just entered a JIRA ticket for this.
>> Is needed some comment inside ?
>
> If you think the ticket requires additional detail, feel free to add some.
Ok, I'll think at something for tomorrow.


> You don't need to run an application in the browser to script it via JavaScript.
> A JavaScript scripting engine comes with Java 6 and above.
You have reason, I've never used this feature ... but for a sort of
"Remote Control" I was thinking at something external that send
commands to Pivot ... let's see what to do.

For the moment thanks,
Sandro

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
> I've seen that Greg has just entered a JIRA ticket for this.
> Is needed some comment inside ?

If you think the ticket requires additional detail, feel free to add  
some.

>> Rather than creating a new macro language, why not simply take  
>> advantage of the existing scripting facilities in the JVM?
> Right, so maybe a first test (or better, Tutorial) could be for an
> Applet, via Javascript (in the Browser), ok ?

You don't need to run an application in the browser to script it via  
JavaScript. A JavaScript scripting engine comes with Java 6 and above.


Re: Scripting Pivot from outside

Posted by Sandro Martini <sa...@gmail.com>.
Hi to all,
thanks for your comments, and I'm happy you like the idea ...

I've used products that used mouse positioning and clicks, but many
problems occurred.
So, from my experience, i think too that the approach of the
(optional) automationID could be the right approach.

I've seen that Greg has just entered a JIRA ticket for this.
Is needed some comment inside ?
You know, my ideas sometimes are confused (also for me :-) ), but
maybe some other info there could be useful ... tell me.


> Rather than creating a new macro language, why not simply take advantage of the existing scripting facilities in the JVM?
Right, so maybe a first test (or better, Tutorial) could be for an
Applet, via Javascript (in the Browser), ok ?
Attaching from another (inspecting/ testing, interactive or not)
process to an existing Pivot application is more complex, and probably
not interesting at the moment.


Thanks,
Sandro

Re: Scripting Pivot from outside

Posted by Todd Volkert <tv...@gmail.com>.
>
> With Pivot the testing tool should just be able to introspect the
>> component hierarchy to find whatever it likes anyway (I want to say
>> XPath, but you know what I mean).
>>
>
> The main problem with this approach is that, if the layout changes (such
> that a button no longer exists at a particular "path"), your test script
> would break. Using automation IDs, the script would still run OK.
>

Good point - our QA lead on a past [AJAX] project frequently complained
about that when we told him to walk the DOM to find the element he needed,
because every time we updated the DOM structure at all, his test scripts
would break :-/

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
> Depends what you're doing, I suppose, but I wouldn't want to litter my
> code/WTKX with automation names, or at least it should be optional.

I agree - this property should be optional. I imagine it would be  
added by QA teams during testing.

> With Pivot the testing tool should just be able to introspect the
> component hierarchy to find whatever it likes anyway (I want to say
> XPath, but you know what I mean).

The main problem with this approach is that, if the layout changes  
(such that a button no longer exists at a particular "path"), your  
test script would break. Using automation IDs, the script would still  
run OK.



Re: Scripting Pivot from outside

Posted by Christopher Brind <br...@brindy.org.uk>.
2009/9/23 Greg Brown <gk...@mac.com>:
> WTKX IDs are not exposed outside the serializer (except via the serializer's
> Dictionary interface). We could try to repurpose them to suit this use case
> as well, but I don't think that's the right approach, since it would
> preclude performing automated testing on UIs that were created in code (not
> via WTKX).
>
> In order to support what you are describing, we might want to add an
> "automationID" property to Component. External code could use this obtain a
> reference to a component and then invoke methods on it.

Which is pretty much how Flex does it as well, see:
http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html#automationName

Depends what you're doing, I suppose, but I wouldn't want to litter my
code/WTKX with automation names, or at least it should be optional.

With Pivot the testing tool should just be able to introspect the
component hierarchy to find whatever it likes anyway (I want to say
XPath, but you know what I mean).

In Flex, I think the automation serves other purposes as well, for
accessibility maybe?  I've never actually used it myself though so
don't know.  We're using automated tools for our product but don't
have the automation names specified - we just look at the right
location in the component hierarchy, like I suggested above for Pivot.

Cheers,
Chris

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
WTKX IDs are not exposed outside the serializer (except via the  
serializer's Dictionary interface). We could try to repurpose them to  
suit this use case as well, but I don't think that's the right  
approach, since it would preclude performing automated testing on UIs  
that were created in code (not via WTKX).

In order to support what you are describing, we might want to add an  
"automationID" property to Component. External code could use this  
obtain a reference to a component and then invoke methods on it.

> In this way we could also expose a sort of Macro/Scriptable System for
> Pivot (without a macro language, ok but this is a detail at the
> moment) ... cool.

Rather than creating a new macro language, why not simply take  
advantage of the existing scripting facilities in the JVM?


Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
I don't think performing automated testing based on mouse location is  
a good idea either. I only suggested using the DisplayHost because  
Sandro mentioned simulating mouse events in his original email. If we  
all agree that it isn't a good approach, it is probably not worth  
pursuing.


On Sep 23, 2009, at 9:49 AM, Todd Volkert wrote:

> If the display host reported its position on the screen, then you  
> could get
> around the screen resolution issues, because the display host's screen
> position would be your starting point, then you could combine that  
> with
> component locations to know where to place the mouse.  Greg can  
> comment on
> how tough it'd be to report the display host's screen position (or  
> if we we
> already do).
>
> -T
>
> On Wed, Sep 23, 2009 at 9:32 AM, Sandro Martini <sandro.martini@gmail.com 
> >wrote:
>
>> Hi to all,
>>
>>> I forgot about that class!
>> Me too :-) , I've never used directly but now I remember this could  
>> help.
>>
>>> It literally takes over the mouse and lets you do things with  
>>> anywhere
>>> on your desktop, not just Java apps.  To make it really useful you'd
>>> have to work out where the Pivot components you wanted to click were
>>> relative to your desktop space which might be tricky if running in a
>>> Web browser, but probably less tricky when running directly on the
>>> desktop.
>> Ok, but with this approach I don't like the click on a certain screen
>> position ... many tools use this way but there are problems, for
>> example the screen (and application, and fonts, etc) resolution has  
>> to
>> be fixed, etc ...
>>
>> But my idea was more in line on how Pivot expose objects (I hope to  
>> be
>> right here :) ), like from my Test Runner (or more in general from an
>> external application, that for some things could be Javascript in the
>> Browser if I'm running one or more Applets) if i could refer to any
>> Pivot element by using its ID as defined in WTK files, and them call
>> its public methods to make some automatic work.
>> For example: in a wtk file I have a Form with id "form1" containing a
>> List with id "list1", a TextInput with id "text1", and a Button with
>> id "button1".
>> So from my application if i could get an handle to the Pivot
>> Application/Applet, then i could get a reference to the form1, call
>> its load method to make it load data from servers, then get a
>> reference to list1 , and call its method to select the second  
>> element,
>> then get a reference to text1 and via its methods, move the focus to
>> it and set some text inside it, and finally, get a reference to
>> button1 and make submit ... then send a keystroke to select another
>> element (for example another Tab), etc ...
>>
>> This could also be an interactive work, like in a Console ... or  
>> better:
>> could also be an interactive Test Mode for our future GUI Builder.
>> What do you think ?
>>
>>
>> In this way we could also expose a sort of Macro/Scriptable System  
>> for
>> Pivot (without a macro language, ok but this is a detail at the
>> moment) ... cool.
>>
>>
>> This idea is a little rough at the moment, maybe after some  
>> discussion
>> could be more clear ...
>>
>>
>>> We don't currently allow a caller to simulate mouse clicks via a  
>>> Pivot
>> API, though you might be able to do so from the DisplayHost.
>> Interesting.
>>
>>> An automated testing framework for Pivot would certainly be  
>>> valuable,
>> though I personally don't see it as a high priority in the short  
>> term.
>> However, you are more than welcome to pursue it if it is something  
>> that
>> interests you.
>> Ok, also for me is a low priority, If this interests I could add a
>> ticket in JIRA under tools, for 1.5 (minimum ...).
>>
>>
>>
>> Thanks,
>> Sandro
>>


Re: Scripting Pivot from outside

Posted by Todd Volkert <tv...@gmail.com>.
If the display host reported its position on the screen, then you could get
around the screen resolution issues, because the display host's screen
position would be your starting point, then you could combine that with
component locations to know where to place the mouse.  Greg can comment on
how tough it'd be to report the display host's screen position (or if we we
already do).

-T

On Wed, Sep 23, 2009 at 9:32 AM, Sandro Martini <sa...@gmail.com>wrote:

> Hi to all,
>
> > I forgot about that class!
> Me too :-) , I've never used directly but now I remember this could help.
>
> > It literally takes over the mouse and lets you do things with anywhere
> > on your desktop, not just Java apps.  To make it really useful you'd
> > have to work out where the Pivot components you wanted to click were
> > relative to your desktop space which might be tricky if running in a
> > Web browser, but probably less tricky when running directly on the
> > desktop.
> Ok, but with this approach I don't like the click on a certain screen
> position ... many tools use this way but there are problems, for
> example the screen (and application, and fonts, etc) resolution has to
> be fixed, etc ...
>
> But my idea was more in line on how Pivot expose objects (I hope to be
> right here :) ), like from my Test Runner (or more in general from an
> external application, that for some things could be Javascript in the
> Browser if I'm running one or more Applets) if i could refer to any
> Pivot element by using its ID as defined in WTK files, and them call
> its public methods to make some automatic work.
> For example: in a wtk file I have a Form with id "form1" containing a
> List with id "list1", a TextInput with id "text1", and a Button with
> id "button1".
> So from my application if i could get an handle to the Pivot
> Application/Applet, then i could get a reference to the form1, call
> its load method to make it load data from servers, then get a
> reference to list1 , and call its method to select the second element,
> then get a reference to text1 and via its methods, move the focus to
> it and set some text inside it, and finally, get a reference to
> button1 and make submit ... then send a keystroke to select another
> element (for example another Tab), etc ...
>
> This could also be an interactive work, like in a Console ... or better:
> could also be an interactive Test Mode for our future GUI Builder.
> What do you think ?
>
>
> In this way we could also expose a sort of Macro/Scriptable System for
> Pivot (without a macro language, ok but this is a detail at the
> moment) ... cool.
>
>
> This idea is a little rough at the moment, maybe after some discussion
> could be more clear ...
>
>
> > We don't currently allow a caller to simulate mouse clicks via a Pivot
> API, though you might be able to do so from the DisplayHost.
> Interesting.
>
> > An automated testing framework for Pivot would certainly be valuable,
> though I personally don't see it as a high priority in the short term.
> However, you are more than welcome to pursue it if it is something that
> interests you.
> Ok, also for me is a low priority, If this interests I could add a
> ticket in JIRA under tools, for 1.5 (minimum ...).
>
>
>
> Thanks,
> Sandro
>

Re: Scripting Pivot from outside

Posted by Sandro Martini <sa...@gmail.com>.
Hi to all,

> I forgot about that class!
Me too :-) , I've never used directly but now I remember this could help.

> It literally takes over the mouse and lets you do things with anywhere
> on your desktop, not just Java apps.  To make it really useful you'd
> have to work out where the Pivot components you wanted to click were
> relative to your desktop space which might be tricky if running in a
> Web browser, but probably less tricky when running directly on the
> desktop.
Ok, but with this approach I don't like the click on a certain screen
position ... many tools use this way but there are problems, for
example the screen (and application, and fonts, etc) resolution has to
be fixed, etc ...

But my idea was more in line on how Pivot expose objects (I hope to be
right here :) ), like from my Test Runner (or more in general from an
external application, that for some things could be Javascript in the
Browser if I'm running one or more Applets) if i could refer to any
Pivot element by using its ID as defined in WTK files, and them call
its public methods to make some automatic work.
For example: in a wtk file I have a Form with id "form1" containing a
List with id "list1", a TextInput with id "text1", and a Button with
id "button1".
So from my application if i could get an handle to the Pivot
Application/Applet, then i could get a reference to the form1, call
its load method to make it load data from servers, then get a
reference to list1 , and call its method to select the second element,
then get a reference to text1 and via its methods, move the focus to
it and set some text inside it, and finally, get a reference to
button1 and make submit ... then send a keystroke to select another
element (for example another Tab), etc ...

This could also be an interactive work, like in a Console ... or better:
could also be an interactive Test Mode for our future GUI Builder.
What do you think ?


In this way we could also expose a sort of Macro/Scriptable System for
Pivot (without a macro language, ok but this is a detail at the
moment) ... cool.


This idea is a little rough at the moment, maybe after some discussion
could be more clear ...


> We don't currently allow a caller to simulate mouse clicks via a Pivot API, though you might be able to do so from the DisplayHost.
Interesting.

> An automated testing framework for Pivot would certainly be valuable, though I personally don't see it as a high priority in the short term. However, you are more than welcome to pursue it if it is something that interests you.
Ok, also for me is a low priority, If this interests I could add a
ticket in JIRA under tools, for 1.5 (minimum ...).



Thanks,
Sandro

Re: Scripting Pivot from outside

Posted by Christopher Brind <br...@brindy.org.uk>.
I forgot about that class!

Yes, it absolutely does let you do mouse events and key presses - I've
used it for some quite dangerous things over the years! ;)

It literally takes over the mouse and lets you do things with anywhere
on your desktop, not just Java apps.  To make it really useful you'd
have to work out where the Pivot components you wanted to click were
relative to your desktop space which might be tricky if running in a
Web browser, but probably less tricky when running directly on the
desktop.

Cheers,
Chris


2009/9/23 Todd Volkert <tv...@gmail.com>:
> Why not just use java.awt.Robot?  I'm not 100% sure, but I think it has the
> ability to simulate mouse events and key events.
> -T
>
> On Wed, Sep 23, 2009 at 7:55 AM, Greg Brown <gk...@mac.com> wrote:
>
>> All component behaviors in Pivot are invoked by public APIs. So, from your
>> examples, you could do:
>>
>> button.requestFocus();
>> button.press();
>> listView.setSelectedIndex(0);
>> menuItem.press();
>> textInput.setText("foo");
>>
>> We don't currently allow a caller to simulate mouse clicks via a Pivot API,
>> though you might be able to do so from the DisplayHost.
>>
>> An automated testing framework for Pivot would certainly be valuable,
>> though I personally don't see it as a high priority in the short term.
>> However, you are more than welcome to pursue it if it is something that
>> interests you.
>>
>>
>>
>> On Sep 23, 2009, at 3:34 AM, Sandro Martini wrote:
>>
>>  Hi to all,
>>> an idea to discuss with all the team ... what do you think on the
>>> ability for Pivot Applications / Applets to be scripted from the
>>> outside world ?
>>>
>>> I'm thinking on something like Macros in Office and other programs ...
>>> for example the ability to sent pivot the same events that usually are
>>> sent inside the application/applet with keyboard and mouse. Like set
>>> focus to an element, select an element in a list or in a menu, set
>>> text in a field, etc ... and maybe also simulate mouse clicks at some
>>> positions.
>>>
>>> This could be very useful for automatic testing, there are some
>>> applications that works in this way (i think FEST but I'm not sure it
>>> works in this way :-) , or others). And also for testing performances
>>> of applications without (real) user interaction.
>>>
>>> In browser we can script if with Javascript, from the Browser, ok ...
>>> but i don't know if we can do all these things.
>>> And for Applications ?
>>>
>>> My trouble here is to verify the infrastructure needed for this, if
>>> it's already in Pivot, or if something has to be added/modified (if we
>>> think it's useful).
>>> Then, a test / tutorial could be interesting.
>>>
>>> Add in JIRA (for the 1.5) ?
>>>
>>> Comments ?
>>>
>>>
>>> Thanks,
>>> Sandro
>>>
>>
>>
>

Re: Scripting Pivot from outside

Posted by Todd Volkert <tv...@gmail.com>.
Why not just use java.awt.Robot?  I'm not 100% sure, but I think it has the
ability to simulate mouse events and key events.
-T

On Wed, Sep 23, 2009 at 7:55 AM, Greg Brown <gk...@mac.com> wrote:

> All component behaviors in Pivot are invoked by public APIs. So, from your
> examples, you could do:
>
> button.requestFocus();
> button.press();
> listView.setSelectedIndex(0);
> menuItem.press();
> textInput.setText("foo");
>
> We don't currently allow a caller to simulate mouse clicks via a Pivot API,
> though you might be able to do so from the DisplayHost.
>
> An automated testing framework for Pivot would certainly be valuable,
> though I personally don't see it as a high priority in the short term.
> However, you are more than welcome to pursue it if it is something that
> interests you.
>
>
>
> On Sep 23, 2009, at 3:34 AM, Sandro Martini wrote:
>
>  Hi to all,
>> an idea to discuss with all the team ... what do you think on the
>> ability for Pivot Applications / Applets to be scripted from the
>> outside world ?
>>
>> I'm thinking on something like Macros in Office and other programs ...
>> for example the ability to sent pivot the same events that usually are
>> sent inside the application/applet with keyboard and mouse. Like set
>> focus to an element, select an element in a list or in a menu, set
>> text in a field, etc ... and maybe also simulate mouse clicks at some
>> positions.
>>
>> This could be very useful for automatic testing, there are some
>> applications that works in this way (i think FEST but I'm not sure it
>> works in this way :-) , or others). And also for testing performances
>> of applications without (real) user interaction.
>>
>> In browser we can script if with Javascript, from the Browser, ok ...
>> but i don't know if we can do all these things.
>> And for Applications ?
>>
>> My trouble here is to verify the infrastructure needed for this, if
>> it's already in Pivot, or if something has to be added/modified (if we
>> think it's useful).
>> Then, a test / tutorial could be interesting.
>>
>> Add in JIRA (for the 1.5) ?
>>
>> Comments ?
>>
>>
>> Thanks,
>> Sandro
>>
>
>

Re: Scripting Pivot from outside

Posted by Greg Brown <gk...@mac.com>.
All component behaviors in Pivot are invoked by public APIs. So, from  
your examples, you could do:

button.requestFocus();
button.press();
listView.setSelectedIndex(0);
menuItem.press();
textInput.setText("foo");

We don't currently allow a caller to simulate mouse clicks via a Pivot  
API, though you might be able to do so from the DisplayHost.

An automated testing framework for Pivot would certainly be valuable,  
though I personally don't see it as a high priority in the short term.  
However, you are more than welcome to pursue it if it is something  
that interests you.


On Sep 23, 2009, at 3:34 AM, Sandro Martini wrote:

> Hi to all,
> an idea to discuss with all the team ... what do you think on the
> ability for Pivot Applications / Applets to be scripted from the
> outside world ?
>
> I'm thinking on something like Macros in Office and other programs ...
> for example the ability to sent pivot the same events that usually are
> sent inside the application/applet with keyboard and mouse. Like set
> focus to an element, select an element in a list or in a menu, set
> text in a field, etc ... and maybe also simulate mouse clicks at some
> positions.
>
> This could be very useful for automatic testing, there are some
> applications that works in this way (i think FEST but I'm not sure it
> works in this way :-) , or others). And also for testing performances
> of applications without (real) user interaction.
>
> In browser we can script if with Javascript, from the Browser, ok ...
> but i don't know if we can do all these things.
> And for Applications ?
>
> My trouble here is to verify the infrastructure needed for this, if
> it's already in Pivot, or if something has to be added/modified (if we
> think it's useful).
> Then, a test / tutorial could be interesting.
>
> Add in JIRA (for the 1.5) ?
>
> Comments ?
>
>
> Thanks,
> Sandro


Re: Scripting Pivot from outside

Posted by Christopher Brind <br...@brindy.org.uk>.
Btw, sorry for the typos, was replying on my phone.

Cheers,
Chris

2009/9/23 Christopher Brind <br...@brindy.org.uk>:
> It's a good idea, I think. Flex has this, so or wouldn't be unique to Pivot.
>
> Probably the Pivot component set should be atom atable (that a word?), and
> all ow custom components to be automtable if they want through a help API
> that Pivot provides.
>
> We could even write an automated testing tool using Pivot. :)
>
> Cheers
> Chris
>
> On Sep 23, 2009 8:34 AM, "Sandro Martini" <sa...@gmail.com> wrote:
>
> Hi to all,
> an idea to discuss with all the team ... what do you think on the
> ability for Pivot Applications / Applets to be scripted from the
> outside world ?
>
> I'm thinking on something like Macros in Office and other programs ...
> for example the ability to sent pivot the same events that usually are
> sent inside the application/applet with keyboard and mouse. Like set
> focus to an element, select an element in a list or in a menu, set
> text in a field, etc ... and maybe also simulate mouse clicks at some
> positions.
>
> This could be very useful for automatic testing, there are some
> applications that works in this way (i think FEST but I'm not sure it
> works in this way :-) , or others). And also for testing performances
> of applications without (real) user interaction.
>
> In browser we can script if with Javascript, from the Browser, ok ...
> but i don't know if we can do all these things.
> And for Applications ?
>
> My trouble here is to verify the infrastructure needed for this, if
> it's already in Pivot, or if something has to be added/modified (if we
> think it's useful).
> Then, a test / tutorial could be interesting.
>
> Add in JIRA (for the 1.5) ?
>
> Comments ?
>
>
> Thanks,
> Sandro
>

Re: Scripting Pivot from outside

Posted by Christopher Brind <br...@brindy.org.uk>.
It's a good idea, I think. Flex has this, so or wouldn't be unique to Pivot.


Probably the Pivot component set should be atom atable (that a word?), and
all ow custom components to be automtable if they want through a help API
that Pivot provides.

We could even write an automated testing tool using Pivot. :)

Cheers
Chris

On Sep 23, 2009 8:34 AM, "Sandro Martini" <sa...@gmail.com> wrote:

Hi to all,
an idea to discuss with all the team ... what do you think on the
ability for Pivot Applications / Applets to be scripted from the
outside world ?

I'm thinking on something like Macros in Office and other programs ...
for example the ability to sent pivot the same events that usually are
sent inside the application/applet with keyboard and mouse. Like set
focus to an element, select an element in a list or in a menu, set
text in a field, etc ... and maybe also simulate mouse clicks at some
positions.

This could be very useful for automatic testing, there are some
applications that works in this way (i think FEST but I'm not sure it
works in this way :-) , or others). And also for testing performances
of applications without (real) user interaction.

In browser we can script if with Javascript, from the Browser, ok ...
but i don't know if we can do all these things.
And for Applications ?

My trouble here is to verify the infrastructure needed for this, if
it's already in Pivot, or if something has to be added/modified (if we
think it's useful).
Then, a test / tutorial could be interesting.

Add in JIRA (for the 1.5) ?

Comments ?


Thanks,
Sandro