💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## 控制浏览器窗口大小 ``` driver.get("http://m.baidu.com") driver.set_window_size(480, 800) ``` ## 控制浏览器后退、前进 ``` import time from selenium import webdriver if __name__ == '__main__': driver = webdriver.Chrome() driver.get('https://www.baidu.com') driver.find_element_by_css_selector("#kw").send_keys("hello word") driver.find_element_by_css_selector("#su").click() time.sleep(2) driver.back() time.sleep(2) driver.quit() ```