Problem still exists.
Import the attached test case.
Use Eclipse as AUT.
Try to re-capture the test case:
1. Click into Class1 editor (somewhere at 2nd line);
2. Press Ctrl+O;
3. Type "main" and press RETURN key.
The following code is recorded:
with [get-editor "Class1.java" | get-text-viewer] {
hover-text 2 17
set-caret-pos 2 14
key-type "M1+o"
hover-text 2 17 -with M1
}
with [get-window -from "Window.createShell()" | get-editbox] {
set-text main
key-type Enter
}
get-editor "Class1.java" | get-text-viewer | key-type Enter
4. Try to replay.
Test fails to locate assistant window because of the hover-text command:
Execution failed on line 7 at column 7 (JavaProjectWithClass.test:7)
Caused by:
The Window "[parentClass, Window.createShell()]" could not be found.
5. Comment line with
6. Try to replay. Test goes further but performs wrong action because key-type Enter command was recorded twice (in Class editor as well as in Assistant window) although it was pressed in assistant window only.
If you comment last line
get-editor "Class1.java" | get-text-viewer | key-type Enter
test will be replayed correctly.
Fixed.