[Xnee-devel] Verifying GUI-Testresults with xnee using the tools "xcutse
From:
Veijo Ryhänen
Subject:
[Xnee-devel] Verifying GUI-Testresults with xnee using the tools "xcutsel" and "xprop"
Date:
Mon, 16 Jan 2006 16:53:05 +0200
Hello!
Currently screen capture based test results verifying seems to be too difficult, too
time consuming and too complicated solution for me: Verifying GUI-Testresults with
xnee using the Tool "xgrabsc" (http://savannah.gnu.org/support/?func=detailitem&item_id=103871).
Anyway, I gave 50 vote for this "picture based" solution. Hopefully it will be
easier to do in the future.
Instead I tried character based test results verifying. This is how I did it:
Recording:
----------
1. Start your application, xcutsel and cnee to recording mode. For example:
2. Record when calculating "1+1="
3. Paint result number (=2) and open "Edit" -menu and select "Copy"
4. Close gnome-calculator
5. Change focus to xcutsel -window and click button "copy PRIMARY to 0"
6. Quit xcutsel
7. Stop xnee recording by using stop -key s (if it works) or use Ctrl+c.
1. Works fine when running first time. But when running second time
there is already result "2" in clipboard. If xnee does not sync when
replaying second time, xprop will get old clipboard value and
script will happily print out: "...2 = OK"
Solution is to clear clipboard content before xnee replay:
2. If there is xclipboard and xcutsel running at the same time, closing
xcutsel will prevent to use "mouse paint, Edit -menu, Copy", because
painted text is copied automatically to clipboard.
Solution: close the xclipboard.
Wish list:
----------
How about "--cut_buffer 0" -switch in cnee ? I would like to use
it instead of xcutsel. If "--cut_buffer 0" switch is defined, then
cnee will "copy PRIMARY to 0" when pressing stop key.
When using "--cut_buffer 0", only thing to remember before pressing
stop key is to copy test result string to clipboard. It would be
little bit easier to record tests when using "--cut_buffer 0" -switch.