| /trunk/ie/BHO/tests/system/system_test.txt r30 | /trunk/ie/BHO/tests/system/system_test.txt r32 | ||
| 1 | 1 | ||
|---|---|---|---|
| 2 | Start a web sever: | 2 | Start a web sever: |
| 3 | 3 | ||
| 4 | >>> import webserve | 4 | >>> import webserve |
| 5 | >>> webserve.start() | 5 | >>> webserve.start() |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | Launch a browser and open the test page: | 8 | Launch the browser and open the test page: |
| 9 | 9 | ||
| 10 | >>> from icedriver import Browser | 10 | >>> from icedriver import Browser |
| 11 | >>> b = Browser() | 11 | >>> b = Browser() |
| 12 | >>> b.goto("http://localhost:8080/system/bho-tests.html") | 12 | >>> b.goto("http://localhost:8080/system/bho-tests.html") |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | An alert should show up, but ice driver should be able to close it: | 15 | |
| 16 | 16 | Call some JavaScript to test the Ice browser extension. | |
| 17 | >>> b.alert("Hello, Alert!") | 17 | (See bho-tests.html to see the exact call.) |
| 18 | |||
| 19 | >>> b.script("callHelloWorld()") | ||
| 18 | Warning: Unexpected dialog box! | 20 | Warning: Unexpected dialog box! |
| 19 | 21 | ||
| 20 | 22 | ||
| 21 | Now call some JavaScript which will test the Ice extension. | 23 | Testing more JavaScript: |
| 22 | See bho-tests.html to see the exact call.) | ||
| 23 | 24 | ||
| 24 | >>> b.script("callShowMessage()") | 25 | >>> b.script("callShowMessage()") |
| 25 | Warning: Unexpected dialog box! | 26 | Warning: Unexpected dialog box! |
| 26 | 27 | ||
| 27 | 28 | ||
| 28 | Another test of the ice browser extension: | 29 | Cleaning everything up: |
| 29 | 30 | ||
| 30 | >>> b.script("callHelloWorld()") | 31 | >>> b.quit() |
| 31 | Warning: Unexpected dialog box! | 32 | >>> webserve.stop() |
| 32 | 33 | ||
| 33 | 34 | ||
| 34 | Cleanup everything up: | 35 | |
| 35 | 36 | ||
| 36 | >>> b.quit() | 37 | |
| 37 | >>> webserve.stop() | 38 | |
| 39 | |||
| 40 | |||