Python Selenium 自动化控制浏览器:查找课程并展开全部内容
切换到点击课程后的标签页
tabs = driver.window_handles for tab in tabs: if tab != driver.current_window_handle: driver.switch_to.window(tab) break
点击展开全部按钮
expand_button = driver.find_element(By.CLASS_NAME, "icon.font.font-toggle-all-collapsed") expand_button.click()
原文地址: https://www.cveoy.top/t/topic/f2N1 著作权归作者所有。请勿转载和采集!