@@ -2520,23 +2520,13 @@ def __get_exception_message(self):
2520
2520
""" This method extracts the message from an exception if there
2521
2521
was an exception that occurred during the test, assuming
2522
2522
that the exception was in a try/except block and not thrown. """
2523
- if sys .version .startswith ('3' ) and hasattr (self , '_outcome' ):
2524
- exception_info = self ._outcome .errors
2525
- if exception_info :
2526
- try :
2527
- exc_message = exception_info [0 ][1 ][1 ]
2528
- except Exception :
2529
- exc_message = "(Unknown Exception)"
2530
- else :
2531
- exc_message = "(Unknown Exception)"
2523
+ exception_info = sys .exc_info ()[1 ]
2524
+ if hasattr (exception_info , 'msg' ):
2525
+ exc_message = exception_info .msg
2526
+ elif hasattr (exception_info , 'message' ):
2527
+ exc_message = exception_info .message
2532
2528
else :
2533
- exception_info = sys .exc_info ()[1 ]
2534
- if hasattr (exception_info , 'msg' ):
2535
- exc_message = exception_info .msg
2536
- elif hasattr (exception_info , 'message' ):
2537
- exc_message = exception_info .message
2538
- else :
2539
- exc_message = '(Unknown Exception)'
2529
+ exc_message = '(Unknown Exception)'
2540
2530
return exc_message
2541
2531
2542
2532
def __get_improved_exception_message (self ):
@@ -2557,6 +2547,7 @@ def __get_improved_exception_message(self):
2557
2547
"Please go to "
2558
2548
"https://sites.google.com/a/chromium.org/chromedriver/ "
2559
2549
"and download the latest version to your system PATH! "
2550
+ "Or use: ``seleniumbase install chromedriver`` . "
2560
2551
"Original Exception Message: %s" % exc_message )
2561
2552
exc_message = update
2562
2553
return exc_message
0 commit comments