@@ -81,46 +81,46 @@ def format_exc(exception, message):
81
81
from seleniumbase .common .exceptions import TextNotVisibleException
82
82
from seleniumbase .common import exceptions
83
83
84
- if exception == Exception :
84
+ if exception is Exception :
85
85
exc = Exception
86
86
return exc , message
87
- elif exception == ElementNotVisibleException :
87
+ elif exception is ElementNotVisibleException :
88
88
exc = exceptions .ElementNotVisibleException
89
89
elif exception == "ElementNotVisibleException" :
90
90
exc = exceptions .ElementNotVisibleException
91
- elif exception == LinkTextNotFoundException :
91
+ elif exception is LinkTextNotFoundException :
92
92
exc = exceptions .LinkTextNotFoundException
93
93
elif exception == "LinkTextNotFoundException" :
94
94
exc = exceptions .LinkTextNotFoundException
95
- elif exception == NoSuchElementException :
95
+ elif exception is NoSuchElementException :
96
96
exc = exceptions .NoSuchElementException
97
97
elif exception == "NoSuchElementException" :
98
98
exc = exceptions .NoSuchElementException
99
- elif exception == TextNotVisibleException :
99
+ elif exception is TextNotVisibleException :
100
100
exc = exceptions .TextNotVisibleException
101
101
elif exception == "TextNotVisibleException" :
102
102
exc = exceptions .TextNotVisibleException
103
- elif exception == NoAlertPresentException :
103
+ elif exception is NoAlertPresentException :
104
104
exc = exceptions .NoAlertPresentException
105
105
elif exception == "NoAlertPresentException" :
106
106
exc = exceptions .NoAlertPresentException
107
- elif exception == NoSuchAttributeException :
107
+ elif exception is NoSuchAttributeException :
108
108
exc = exceptions .NoSuchAttributeException
109
109
elif exception == "NoSuchAttributeException" :
110
110
exc = exceptions .NoSuchAttributeException
111
- elif exception == NoSuchFrameException :
111
+ elif exception is NoSuchFrameException :
112
112
exc = exceptions .NoSuchFrameException
113
113
elif exception == "NoSuchFrameException" :
114
114
exc = exceptions .NoSuchFrameException
115
- elif exception == NoSuchWindowException :
115
+ elif exception is NoSuchWindowException :
116
116
exc = exceptions .NoSuchWindowException
117
117
elif exception == "NoSuchWindowException" :
118
118
exc = exceptions .NoSuchWindowException
119
- elif exception == NoSuchFileException :
119
+ elif exception is NoSuchFileException :
120
120
exc = exceptions .NoSuchFileException
121
121
elif exception == "NoSuchFileException" :
122
122
exc = exceptions .NoSuchFileException
123
- elif exception == NoSuchOptionException :
123
+ elif exception is NoSuchOptionException :
124
124
exc = exceptions .NoSuchOptionException
125
125
elif exception == "NoSuchOptionException" :
126
126
exc = exceptions .NoSuchOptionException
0 commit comments