from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('http://www.baidu.com')
time.sleep(2)
#模拟键盘输入ctrl+a
driver.find_element_by_tag_name('body').send_keys(Keys.CONTROL+'a')
time.sleep(2)
driver.quit()
02-14
849
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-29
427
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)