1.在fire fox上安裝selenium IDE
打開fire fox
點擊“附加組件”
點擊“查看更多組件”
搜索“selenium ide”
選擇“Selenium IDE Button”,添加到fire fox
重啟fire fox
2.錄制
打開fire fox
點擊“開發者”
點擊“selenium ide”
此時就可以操作網頁,做需要錄制的操作
錄制完成后,停止錄制
3.保存成Python腳本
在步驟2打開的selenium IDE中點擊“文件”
選擇“Export Test Case As”
選擇Python2/unittest/webdriver
保存成.py的文件