1、明明有文件,打印出来的却是空白,因为在js里,数据是动态的。


2、切换到标签里就可以了
n = driver.window_handles
driver.switch_to.window (n[1])
print(driver.current_url)
# element = driver.find_element_by_id("b")
# driver.switch_to_default_content()
frame = driver.find_element_by_css_selector("iframe")
driver.switch_to_frame(frame)
print(driver.page_source)
links = driver.find_element_by_id("go")
links.click()
3、打印出来的效果

网友评论