我想在此頁面的彈出窗口中獲取鏈接。 http://stivconsultasexternas.cnbv.gob.mx/ConsultaInformacionEmisoras.aspx 單擊出現頁面的第一個鏈接會顯示一個彈出窗口。我喜歡在薄窗口中獲得鏈接。在彈出窗口中獲取鏈接(python,selenium)
這是我的代碼。我感謝任何幫助。
from selenium import webdriver
import time
driver = webdriver.Firefox()
driver.get("http://stivconsultasexternas.cnbv.gob.mx/ConsultaInformacionEmisoras.aspx")
link=driver.find_elements_by_partial_link_text(u"Verum")
time.sleep(5)
link[0].click()
time.sleep(5)
print driver.page_source.encode("utf_8","ignore")#Here I want a html of a popup window.
非常感謝。
非常感謝。如果不是不方便你解釋我你怎麼知道這個彈出框是DefaultPlaceholder_callbackPanel_Popup_CIF-1?無論如何,我感謝你的幫助。 – Nash 2014-09-19 15:37:26
@Nash希望我的編輯很有用。 – Richard 2014-09-19 16:25:54
對不起後一個問題。我如何關閉現在打開的框架。因爲我想用於打開許多幀。我想,當一個框架打開時,我無法打開另一個框架鏈接。非常感謝。 – Nash 2014-09-19 17:20:13