请教大神!为什么最后一行为什么会报错!!
from time import sleepfrom selenium import webdriver
from selenium. import By
from selenium. import ActionChains
driver=webdriver.Chrome()
driver.get("https:/www.baidu.com")
driver.find_element(By.LINK_TEXT,"新闻").click()
h=driver.window_handles
driver.switch_to.window(h[1])
driver.find_element(By.PARTIAL_LINK_TEXT,"常务委员会召开会议").click()
h1=driver.window_handles
print(h1)
print(h1[2])
driver.switch_to.window(h1[2])
driver.find_element(By.XPATH,"/html/body/div[5]/div[1]/div[2]/div[2]/div[1]/div/a[3]").click()