Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Why AGR did not record any thing while changing to ther editors?
Why AGR did not record any thing while changing to ther editors? [message #44175] Thu, 01 December 2005 09:42 Go to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

When i want to record the action of changing editor, I find nothing was
recorded in the macro. And if the changing was followed by other
operations, an error will occur.

Anybody help?

Charles Xia
Re: Why AGR did not record any thing while changing to ther editors? [message #44205 is a reply to message #44175] Thu, 01 December 2005 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Sorry, error occurs when the case was playbacked.
Re: Why AGR did not record any thing while changing to ther editors? [message #44357 is a reply to message #44175] Fri, 02 December 2005 00:10 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Hi Charles,

Use the context menu of the editor input (i.e. the file) to open the editor.
For example, if you wish to open the Java editor for a Java file (right
click on the file and select open)
Refer to
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.5
to find out what commands are supported by AGR.

"Charles Xia" <Charles.pku@gmail.com> wrote in message
news:3856ae95cb4a7d07b26725733bf29efa$1@www.eclipse.org...
>
> When i want to record the action of changing editor, I find nothing was
> recorded in the macro. And if the changing was followed by other
> operations, an error will occur.
>
> Anybody help?
>
> Charles Xia
>
Re: Why AGR did not record any thing while changing to ther editors? [message #44419 is a reply to message #44357] Fri, 02 December 2005 02:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Thanks for ur help.

I find that AGR have problemes in select tree item, for I notice that it
could only record the first child of a father node. However, select from a
tree is necessary in my job, how could i resolve it ?

Charles Xia
Re: Why AGR did not record any thing while changing to ther editors? [message #44480 is a reply to message #44419] Fri, 02 December 2005 15:13 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
It shouldn't have any problems selecting nodes of a tree. Can you elaborate
more on what your use case is? Are you doing a multi-selection of nodes in
a tree? or are you just simply selecting a single tree node?

Does your tree have the following layout and you're selecting tn2?
[-] root
|___[-] tn1
|____[+] tn2

Or does it have the following layout and you're selecting tn2?:
[-] root
|___[+] tn1
|___[+] tn2

When you do a selection, an item-select macro command will be generated.
Similar to the one below:
<command type="item-select"
contextId="view/org.eclipse.hyades.trace.internal.ui.PDProjectExplorer "

widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}">
<item
path=" org.eclipse.hyades.models.hierarchy.impl.TRCProcessProxyImpl 0|0||0| "/>
</command>
Make sure that you get these commands for each selected tree node.

One important thing to keep in mind is that AGR will dynamically get rid of
redundant user actions. For example, if the user selects node1 followed
immediately by node2, then the item select for node 1 will not be recorded.
In order for both to be recorded, then something useful has to happen in
between the two selections (e.g. select node1 > use the context menu to open
an editor > select node 2 > use the context menu to open an editor)


"Charles Xia" <Charles.pku@gmail.com> wrote in message
news:04e795e9bf8962d414b836b53e76168b$1@www.eclipse.org...
> Thanks for ur help.
>
> I find that AGR have problemes in select tree item, for I notice that it
> could only record the first child of a father node. However, select from a
> tree is necessary in my job, how could i resolve it ?
>
> Charles Xia
>
>
Re: Why AGR did not record any thing while changing to ther editors? [message #45015 is a reply to message #44480] Tue, 06 December 2005 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Dearl Ali,

I have checked my operations, but those tree-selecting problems stll exist.
A detailed description is here. My operation: file->new->project,then a
dialog with bellow tree will be displayed.

[+] tn1
[+] tn2
[+] tn3
[-] tn4
||_____ l1
||_____ l2
||_____ l3
||_____ l4
||_____ l5 ( l5 is defalult selected)
||_____ l6
[+] tn5
[+] tn6

and tn2 has two children [-] tn2
|_____ l7
|_____ l8

tn6 has two children [-] tn6
|_____ [+]
|_____ [+]

Some problemes that i found:
1 if the item selected is above tn4, their first child node could be
selected. But, others could not.
The example in "Introtution to ... " could be rightly recorded
perhaps because the "java project"
is the first child of "java". The second child "The java project from
exist ant buildfile" could not
be selected.
2 In all children of tn4 and bellow tn4, only l1 could be recorded.

op sequence and the generated macro :

1 expand tn2, select l7, then next
************************************************
<command type="item-select"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1">
<item
path="org.eclipse.ui.internal.dialogs.WizardCollectionElement0 "/>
</command>
<command type="item-expand"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1" value="true">
<item
path="org.eclipse.ui.internal.dialogs.WizardCollectionElement2 "/>
</command>
<command type="item-select"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1">
<item
path="org.eclipse.ui.internal.dialogs.WorkbenchWizardElement-1 "/>
</command>
************************************************
2 expand tn2, select l8, then next
************************************************
<command type="item-select"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1">
<item
path="org.eclipse.ui.internal.dialogs.WizardCollectionElement0 "/>
</command>
<command type="item-expand"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1" value="true">
<item
path="org.eclipse.ui.internal.dialogs.WizardCollectionElement2 "/>
</command>
<command type="item-select"
contextId="wizard-page/newWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Tree#1">
<item
path="org.eclipse.ui.internal.dialogs.WorkbenchWizardElement-1 "/>
</command>
************************************************
1 and 2 generate the same output macro

When I try to modify the macro, errors allways happen. Could u help?
Re: Why AGR did not record any thing while changing to ther editors? [message #45030 is a reply to message #45015] Tue, 06 December 2005 20:09 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Hi Charles,

Looking at your macro, it seems that you have an old copy of AGR that didn't
have "org.eclipse.ui.internal.dialogs.WizardCollectionElement" registered in
widgetReg.xml file that is included with the plugin.

I would recommend downloading the 4.1 release build (Go to
www.eclipse.org/tptp > Click on Downloads > The "Latest Release - 4.1.0" tab
should be selected by default). The problem comes from not having a
registered widget entry under
org.eclipse.tptp.test.auto.gui_4.1.0\auto-gui\widgetReg.xml that would make
AGR aware of the objects you are expanding/selecting in the wizard page.
The specific entry that makes the AGR recorder aware of the tree items is:

<class name = "org.eclipse.ui.internal.dialogs.WizardCollectionElement"
matchThreshold = "1.0">
<method name = "getId" weight = "1.0"/>
</class>

To find out more about the adaptive widget resolver, see
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1

Thanks


"Charles" <Charles.pku@gmail.com> wrote in message
news:cf14b5c73a43807e253d99e14b97a8df$1@www.eclipse.org...
> Dearl Ali,
>
> I have checked my operations, but those tree-selecting problems stll
exist.
> A detailed description is here. My operation: file->new->project,then a
> dialog with bellow tree will be displayed.
>
> [+] tn1
> [+] tn2
> [+] tn3
> [-] tn4
> ||_____ l1
> ||_____ l2
> ||_____ l3
> ||_____ l4
> ||_____ l5 ( l5 is defalult selected)
> ||_____ l6
> [+] tn5
> [+] tn6
>
> and tn2 has two children [-] tn2
> |_____ l7
> |_____ l8
>
> tn6 has two children [-] tn6
> |_____ [+]
> |_____ [+]
>
> Some problemes that i found:
> 1 if the item selected is above tn4, their first child node could be
> selected. But, others could not.
> The example in "Introtution to ... " could be rightly recorded
> perhaps because the "java project"
> is the first child of "java". The second child "The java project from
> exist ant buildfile" could not
> be selected.
> 2 In all children of tn4 and bellow tn4, only l1 could be recorded.
>
> op sequence and the generated macro :
>
> 1 expand tn2, select l7, then next
> ************************************************
> <command type="item-select"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item
> path="org.eclipse.ui.internal.dialogs.WizardCollectionElement0 "/>
> </command>
> <command type="item-expand"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1" value="true">
> <item
> path="org.eclipse.ui.internal.dialogs.WizardCollectionElement2 "/>
> </command>
> <command type="item-select"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item
> path="org.eclipse.ui.internal.dialogs.WorkbenchWizardElement-1 "/>
> </command>
> ************************************************
> 2 expand tn2, select l8, then next
> ************************************************
> <command type="item-select"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item
> path="org.eclipse.ui.internal.dialogs.WizardCollectionElement0 "/>
> </command>
> <command type="item-expand"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1" value="true">
> <item
> path="org.eclipse.ui.internal.dialogs.WizardCollectionElement2 "/>
> </command>
> <command type="item-select"
> contextId="wizard-page/newWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item
> path="org.eclipse.ui.internal.dialogs.WorkbenchWizardElement-1 "/>
> </command>
> ************************************************
> 1 and 2 generate the same output macro
>
> When I try to modify the macro, errors allways happen. Could u help?
>
>
Re: Why AGR did not record any thing while changing to ther editors? [message #45100 is a reply to message #45030] Thu, 08 December 2005 09:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Ali,
Thank you very much! The tree selecting problemes have been solved after i
reinstalled the tptp and AGR, following ur advice. However another problem
occured.

The AGR produced such Macro to the click of a Twistie control :
************************************************************ ***********
<command type="focus"
contextId=" editor/org.eclipse.hyades.test.ui.editor.TestSuiteEditorPart /AutomatedTestSuite.testsuite "
widgetId="org.eclipse.ui.forms.widgets.Twistie#2"/>
************************************************************ ***********

When the case was replayed, the Twistie did not expand/collapse as
expected.
I have test some other Twistie, situation is the same.
Is there any thing wrong with my operation?
Re: Why AGR did not record any thing while changing to ther editors? [message #45257 is a reply to message #45100] Thu, 08 December 2005 16:40 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Unfortunately twisties are not supported.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=110416 has been opened to
provide easier means for contributors to extend the range of macro commands.



You can either:



1) Resort to position-based recording

2) Extend the macro command coverage by hacking the code a little

3) Use other means to record a twistie click (i.e. expanding/collapsing the
twistie indirectly through a different sequence of UI actions). This may or
may not be possible.



"Charles" <Charles.pku@gmail.com> wrote in message
news:d5d7baafc42ab59c8e6bbbefe7fa2bcd$1@www.eclipse.org...
> Ali,
> Thank you very much! The tree selecting problemes have been solved after i
> reinstalled the tptp and AGR, following ur advice. However another problem
> occured.
>
> The AGR produced such Macro to the click of a Twistie control :
> ************************************************************ ***********
> <command type="focus"
>
contextId=" editor/org.eclipse.hyades.test.ui.editor.TestSuiteEditorPart /Auto
matedTestSuite.testsuite"
> widgetId="org.eclipse.ui.forms.widgets.Twistie#2"/>
> ************************************************************ ***********
>
> When the case was replayed, the Twistie did not expand/collapse as
> expected.
> I have test some other Twistie, situation is the same.
> Is there any thing wrong with my operation?
>
Re: Why AGR did not record any thing while changing to ther editors? [message #46305 is a reply to message #45257] Tue, 13 December 2005 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Dear Ali,
Thanks for ur help.
Does the AGR support treecolumn/tabletree widget?

I am new to eclipse and Java, my programming experience are maily in
C/C++, so i wonder if there are other tools in eclipse that could be used
to test a GUI of eclipse plugin. (Although position based tools could do
the job, we wanna a more accurate one.)

Any suggestion?

Charles
Re: Why AGR did not record any thing while changing to ther editors? [message #46335 is a reply to message #46305] Tue, 13 December 2005 08:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

bellow is the recorded macro of the operation to expand the first item of
the tabletree:

<command type="item-expand"
contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
widgetId="org.eclipse.swt.custom.TableTree#1" value="false">
<item path="com.sarvega.ide.core.appdef.ExternalServerPool"/>
</command>
<command type="item-select"
contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
widgetId="org.eclipse.swt.widgets.Table#5">
<item path="0"/>
</command>
Re: Why AGR did not record any thing while changing to ther editors? [message #46695 is a reply to message #46335] Thu, 15 December 2005 01:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Hi, Ali, Could you help?
Re: Why AGR did not record any thing while changing to ther editors? [message #46717 is a reply to message #46305] Thu, 15 December 2005 02:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Yes, you should be able to expand items in a table tree.
Are you having any specific problem?


"Charles" <Charles.pku@gmail.com> wrote in message
news:aec0137581c4f33ea37a765228e275ce$1@www.eclipse.org...
> Dear Ali,
> Thanks for ur help.
> Does the AGR support treecolumn/tabletree widget?
>
> I am new to eclipse and Java, my programming experience are maily in
> C/C++, so i wonder if there are other tools in eclipse that could be used
> to test a GUI of eclipse plugin. (Although position based tools could do
> the job, we wanna a more accurate one.)
>
> Any suggestion?
>
> Charles
>
>
>
Re: Why AGR did not record any thing while changing to ther editors? [message #46736 is a reply to message #46717] Thu, 15 December 2005 07:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Charles.pku.gmail.com

Hi Ali,

In my case, the replay of TableTree/TreeColumn operations fail -- the node
is not expanded as expected.

Only one item in the TableTree. If expanded, one son node will display.
the operation of expanded the node generated following macro:

<command type="item-expand"
contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
widgetId="org.eclipse.swt.custom.TableTree#1" value="false">
<item path="com.sarvega.ide.core.appdef.ExternalServerPool"/>
</command>
<command type="item-select"
contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
widgetId="org.eclipse.swt.widgets.Table#5">
<item path="0"/>
</command>
Re: Why AGR did not record any thing while changing to ther editors? [message #46879 is a reply to message #46736] Thu, 15 December 2005 17:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
The item-expand below has its "value" attribute set to "false". This would
be interpreted as a collapse instead of an expansion. Change the value to
"true" to see if it resolves your problem.
<command type="item-expand"
contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
widgetId="org.eclipse.swt.custom.TableTree#1" value="false">

Also, I'm not sure what driver you're using but the value of the path
attribute in this fragment <item
path="com.sarvega.ide.core.appdef.ExternalServerPool"/> should have an index
appended to it. When the path of an item is resolved as a classname, then
it means that AGR couldn't find an entry in its widget resolving mechanism.
See the user guide on how you can register your widget and use a more
concrete ID.

Finally, the item-select element following the item-expand command has a
completely different widget id. If you're expanding and selecting in the
same treetable view, then the widget ids should be the same. It seems odd
that they're different (unless of course you used a different context to do
the selection than the context used to do the expansion).

"Charles" <Charles.pku@gmail.com> wrote in message
news:eb3c0b1cf113c3a87585b4b716097131$1@www.eclipse.org...
> Hi Ali,
>
> In my case, the replay of TableTree/TreeColumn operations fail -- the node
> is not expanded as expected.
>
> Only one item in the TableTree. If expanded, one son node will display.
> the operation of expanded the node generated following macro:
>
> <command type="item-expand"
> contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
> widgetId="org.eclipse.swt.custom.TableTree#1" value="false">
> <item path="com.sarvega.ide.core.appdef.ExternalServerPool"/>
> </command>
> <command type="item-select"
> contextId="editor/com.sarvega.ide.editor.appdef.AppDefEditor/xesos.xml "
> widgetId="org.eclipse.swt.widgets.Table#5">
> <item path="0"/>
> </command>
>
>
>
>
Previous Topic:Using command line parameters with IProces and new Agent Controller
Next Topic:tptpFileTransferAgent.exe broken?
Goto Forum:
  


Current Time: Mon Nov 24 03:07:44 GMT 2014

Powered by FUDForum. Page generated in 0.02482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software