错误1:AttributeError: type object 'Logger' has no attribute '_Logger__logger'
这种问题是找不到对应的值,一般是打错字,可能是方法打错字,可能是获取的值打错字。
目前知道的方法:从头开始检查
错误2:list index out of range
原因一:超出了list范围:
例如 list=(0,1,2),却在编程中使用了list【5】
原因二:list为空,在这种情况下使用list【0】便会报错
错误3:server_hostname cannot be an empty string or start with a leading dot
使用场景:发送邮件
错误原因:python 3.8的smtplib.SMTP要赋值
解决方法:
错误4:a.tagName.toUpperCase is not a function
使用场景:selenium 定位下拉框的时候,报错
Select(driver.find_element_by_id("AAA")).select_by_value('1')
原因:未知。
解决方法:换成鼠标事件操作:ActionChains