我正在嘗試使用Firefox的WebDriver,並且想詢問是否可以處理「下載」窗口(接受或拒絕傳入的下載請求)?通過Firefox處理「下載」窗口WebDriver
例如,一段簡單的代碼:
import selenium.firefox.webdriver
dr = selenium.firefox.webdriver.WebDriver()
# Firefox is showed up.
# Let's say I'd want to download python.
dr.get('http://python.org/ftp/python/3.1.3/python-3.1.3.msi')
# Download window is showed up.
# How could I accept the download request?
# As I understand, the method below should return
# two handles but I get only main window's handle.
handles = dr.get_window_handles()
# Seems like WebDriver cannot "see" this popup.
我這個試驗一點點,但還沒有找到解決辦法。我真的很感激任何提示。
非常感謝, - V
是公平的假設,來調整FF喜好的能力完全不在的webdriver的ablities的,完全的東西在紅寶石寫的?我想爲PHP綁定做類似的事情,並對如何完成它感到好奇。 – tipu 2012-03-02 19:19:50