刷新页面方法
具体代码:
# coding=utf-8 import time from selenium import webdriver driver = webdriver.Chrome() driver.maximize_window() driver.implicitly_wait(6) driver.get("https://www.baidu.com") time.sleep(2) try: driver.refresh() print('test pass :refresh successful') except Exception as e: print("Exception found",format(e)) driver.quit()
参考文章:https://blog.csdn.net/u011541946/article/details/68927515