为啥以下代码,函数传入参数后,报错不会按照函数定义执行pass,而是直接报TimeoutException错误
def exit_error(x):
try:
x
except Exception as e:
print("pass")
pass
else:
print("加载完成")
exit_error(Wait(driver, 2).until(EC.text_to_be_present_in_element((By.XPATH, '//td[@class="Data9-d1 Data9-d-link"]'), u"投入报表")))