**#2020年3月9日执行下面代码(perform后与老师定位“前端工具”的代码相同)但报错了:**
driver = webdriver.Chrome()
maxwindow = driver.maximize_window()
driver.get('https://www.imooc.com/')
time.sleep(5)
driver.find_element_by_class_name('redrain-closeBtn').click()
time.sleep(5)
element = driver.find_element_by_class_name('menuContent').find_elements_by_class_name('item')[1]
ActionChains(driver).move_to_element(element).perform()
time.sleep(5)
driver.find_elements_by_class_name('tag_box')[1].find_element_by_link_text('CSS').click()
time.sleep(3)
#报错如下:
driver.find_elements_by_class_name(‘tag_box’)[1].find_element_by_link_text(‘前端工具’).click()
IndexError: list index out of range