Im trying to get familiar with TPTP's Automated GUI Recorder and use it
to interactive user interface tests.
During these investigations I have problems with properties view.
I tried TPTP 4.1.0.1 (Eclipse 3.1.2) and it was not possible to record any
action connected with Properties view.
Now, Im using TPTP 4.2 (Eclipse 3.2) and my problem is solved partially.
Recorded macro works great for selection PropertySheetCategory and
PropertySheetEntry. Following macro selects item from my tree and
correctly select its PropertySheetEntry:

Are there any ways for me to be able to reproduce this problem?
I was able to successfully record and playback a focus command (which is
similar to a modify command) on a text box in a tabbed property page using
4.3

I changed my TPTP version to 4.3.0-200609071545.
Now, focus command on Text box or on Combo box shows no errors.
Problems with modify command and choice-select command on Properties View
elements still persist.

Focus command works correctly.
Following error appears on modify line:

org.eclipse.core.runtime.CoreException
Error while executing a macro command: MacroCommand [modify, line 21]
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.eclipse.tptp.test.auto.gui.internal.commands.ModifyComma nd.playback(ModifyCommand.java:224)
at
org.eclipse.tptp.test.auto.gui.internal.commands.MacroComman dShell$4.run(MacroCommandShell.java:1160)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

Similar error appears for choice-select command.
Is it any possibility to solve these problems?

It's quite weird that it is able to focus the text box and not be able to
find it for the modify command. I've noticed that the ID of the text box is
index-based (i.e. widgetId="org.eclipse.swt.widgets.Text#1"). This happens
only if registered widget resolvers are not able to determine the ID of the
text box. If you have access to the source of the property sheet, then try
defining a deterministic ID for the text box in the property sheet.

1) Open
<ECLIPSE-HOME> \plugins\org.eclipse.tptp.test.auto.gui_4.2.0.v200609071545\ auto-gui\widgetReg.xml
2) Add the following entry:

I would like to touch on this topic because my problem hasn't been
resolved.
Now, I'm using TPTP-4.3.0-200611160100D with Eclipse SDK 3.2.1.
I added described data element to my property shit and I modified
widgetReg.xml file.
Record process returned expected widget ID for text box on property sheet.
Following entry appears in recorded use case (line 16):
<command type="modify"
resolverId="org.eclipse.tptp.test.auto.gui.adaptive"
contextId="view/org.eclipse.ui.views.PropertySheet"
widgetId="{{Name}}-{{1.0}}">
<![CDATA[newName]]>
</command>

It is impossible to play this Test Case. Modify command error appears:
org.eclipse.core.runtime.CoreException

Error while executing a macro command: MacroCommand [modify, line 16]
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.eclipse.tptp.test.auto.gui.internal.commands.ModifyComma nd.playback(ModifyCommand.java:224)
at
org.eclipse.tptp.test.auto.gui.internal.commands.MacroComman dShell$4.run(MacroCommandShell.java:1160)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3143)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2845)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

I have used your TestModel.ecore file to reproduce this problem and I =
ran into the same ArrayIndexOutofBoundsException while trying to play =
back a testcase which was making a modification to one of the property =
values in the Properties View. The good news is that the only case in =
which this failed was caused by the parent element having been already =
selected and expanded prior to recording. The solution is to always =
expand the parent item first and then select the child which you want to =
edit and modify it. Even in the case where the parent is already =
expanded, you can close the expansion and then re-expand the parent and =
the recording should play back successfully. In the case where there was =
no parent element to expand, my testcase played back successfully.=20

I am able to run the recording described in your last post. However, I do
see the ArrayIndexOutofBounds when I am not selecting and then expanding
each item in the Tree (model Tree). Also, I found it necessary to select the
Property Name in the Properties Tab and then make the modification to the
Value.

To debug what is happening for you, I would try ensuring that all of your
commands up to the modify are being played back correctly by inserting
verification hooks to verify each selection. Also, ensure that if you are
playing back in Quick Mode, you 'reset' the Model Tree each time so it is
not expanded before the playback (including all children). This will rule
out the error being caused by a previous selection/expansion not being
correctly played. You may also wish to insert wait commands so that you can
see the playback more clearly.

I started running into your problem consistently while trying to =
reproduce your exact steps. However, I spent some time comparing the =
results I was getting with those from my testing before my last post to =
decipher what sequence of actions would allow successful playback.

I found that in order to record the property modification you need to =
double click the property name and then begin editing (typing). It =
seems selecting the value field and then editing is what was causing my =
test case failures today. This is because the double-click sends a =
default-select command and the single click sends an item-select command =
which seems to not be allowing editing. I have opened the following =
defect to address this:https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D170371

Please feel free to add yourself to the CC list to track its progress.
In the mean time, ensure you are double-clicking the property (check the =
macro for a default-select) and this should solve your problem. Please =
let me know if you have further questions.