修改python3源码:
class MobileErrorHandler(errorhandler.ErrorHandler):
def check_response(self, response):
try:
super(MobileErrorHandler, self).check_response(response)
except WebDriverExceptionas wde:
if wde.msg =='No such context found.':
raise NoSuchContextException(wde.msg, wde.screen, wde.stacktrace)
else:
raise wde
修改为:
class MobileErrorHandler(errorhandler.ErrorHandler, BaseException):
def check_response(self, response):
try:
super(MobileErrorHandler, self).check_response(response)
except WebDriverExceptionas wde:
if wde.msg =='No such context found.':
raise NoSuchContextException(wde.msg, wde.screen, wde.stacktrace)
else:
raise wde












网友评论