小白请教问题,python3.6+selenium+chrome淘宝测试,报错<class 'Exception'>代码如下
browser = webdriver.Chrome()wait = WebDriverWait(browser, 10)
def search():
try:
browser.get('https://www.')
input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#q")))
submit = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "#J_TSearchForm > div.search-button > button")))
input.sendkeys('美食')
submit.click()
except Exception:
print(Exception)
def main():
search()
if __name__ == '__main__':
main()
能打开浏览器但不能进行其他操作,报错为<class 'Exception'>,请教一下什么原因