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