A. 如何用python的splinter操控一個已打開的網頁
browser = selenum.webdriver.get("網址") browser.find_element_by_xpath(//路徑/a).text
B. python和splinter怎麼關聯起來
你要是單獨下載的話,應該裡面有setup.py文件,你需要用一條命令:
python或者python3setup.pyinstall
當然安裝python第三方庫時,不建議這么搞,麻煩。最好用pip方式來安裝,比如:
pipinstallsplinter
或者
pip3installsplinter
以上兩種方式分別對應python2和python3來說的。
C. 使用Python和Splinter打開了chrome沒有動態提示是怎麼回事
a.看chrome版本。
b.看版本對應的驅動:http://blog.csdn.net/huilan_same/article/details/51896672
c.下載驅動(國內鏡像):http://npm.taobao.org/mirrors/chromedriver/
d.配置chromedriver地址到環境變數。或者把chromedriver.exe放到python下的Scripts文件夾下。
e.重啟python交互窗口,重新執行代碼。
D. 如何python和splinter自動化測試腳本
方法如下: 1. 如果安裝了easy_install或pip, 用easy_install splinter或pip install splinter 2. 到http://pypi.python.org/pypi/splinter下載壓縮包, 解壓, 在命令行下進入解壓目錄, 執行 python setup.py install