這里做了3件事兒:檢驗微博是否發出去了;關閉瀏覽器,關閉Selenium Server
執行結束后,在命令行會返回給你一些信息:
D:\Python26\Scripts>pybot testWeibo.html
==============================================================================
testWeibo
==============================================================================
OpenWeibo | FAIL |
Timed out after 60000.0ms
------------------------------------------------------------------------------
testWeibo | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output: D:\Python26\Scripts\output.xml
Log: D:\Python26\Scripts\log.html
Report: D:\Python26\Scripts\report.html
信息包括簡要的執行情況,生成的日志和測試報告路徑。
我們可以查看log文件和report文件以了解更加詳細的信息。Log和Report的內容都是可以定制的,如何定制會在今后的blog中說明。
拓展
我們用Selenium Library完成了一個對微博的簡單測試??雌饋砗芎唵?,但是實際情況會復雜很多。如果想真正掌握它需要通讀SL的庫文檔,甚至Selenium的相關文檔。Web測試不是那么簡單,我也是菜鳥,大家一起進步
原文轉自:http://www.anti-gravitydesign.com