source: Dev/trunk/src/client/dojox/robot/README @ 532

Last change on this file since 532 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 2.9 KB
Line 
1-------------------------------------------------------------------------------
2dojox.robot.recorder
3-------------------------------------------------------------------------------
4Version 0.1
5Release date: 2008-07-30
6-------------------------------------------------------------------------------
7Project state: experimental
8-------------------------------------------------------------------------------
9Project authors
10        Mark Hays
11-------------------------------------------------------------------------------
12Project description
13
14Writing automated test cases takes time, and DOH is no exception. You have to
15look up element ids, invent dojo.queries for elements with no id,
16figure out exactly how many pixels to move the mouse . . . the list goes on.
17
18This recorder module enables DOH test case writers to create complete DOH test
19scripts directly from their actions and input on a Web page. Simply drop the
20generated code into your test page, set a pass condition, and the test will
21repeat your actions.
22-------------------------------------------------------------------------------
23Dependencies:
24
25dojo
26-------------------------------------------------------------------------------
27Documentation
28
29See installation instructions below to prepare a test page for recording.
30
31To record a test, click in an area of the document with no dojo.stopEvents
32and press CTRL-ALT-ENTER in the main window. You will get a verification alert
33when you successfully start the recorder. Then you can interact with the Web
34page and the recorder will monitor your actions. It's usually good to record one
35test per widget instance per type of interaction (keyboard vs mouse for instance)
36you are testing.
37
38After you finish interacting with the Web page, click out of any dojo.stopEvents
39and press CTRL-ALT-ENTER again. You will see a box containing the generated source
40code for your recording. Copy this into a dojo.addOnLoad on the same page to register
41the test with DOH. Replace the /*Your condition here*/ text with a JS condition that
42indicates that the test passed. Again, having multiple small tests will help you
43keep the condition small. Add a doh.run() call after you register all of your tests
44to make them execute when you load the page.
45-------------------------------------------------------------------------------
46Installation instructions
47
48To ready the recorder for a particular page, add this line to your dojo.requires:
49dojo.require("dojox.robot.recorder");
50
51You can safely remove this line after you are finished recording your tests.
52-------------------------------------------------------------------------------
53Additional Notes
54
55Known limitations:
56- Content in an iframe might not report events to the recorder.
57- keyDown/keyUp events are supported by DOH, but not by the recorder.
58        If you hold a key down, it will generate lots of keyPress events instead.
59        Simply change these to one keyDown call yourself.
Note: See TracBrowser for help on using the repository browser.