python编写selenium脚本,导入了SwitchTo但是在运行时报错
python编写selenium脚本,导入了SwitchTo但是在运行时报错:TypeError: 'SwitchTo' object is not callable代码如下:
from selenium import selenium
from selenium import webdriver
import time
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.remote.webdriver import SwitchTo
......
driver.switch_to()
writeMail = driver.find_element_by_css_selector("li")
writeMail.click()
time.sleep(6)
页:
[1]