@@ -124,42 +124,43 @@ def format_exc(exception, message):
124124 from selenium .common .exceptions import NoSuchWindowException
125125 from seleniumbase .common .exceptions import NoSuchFileException
126126 from seleniumbase .common .exceptions import TextNotVisibleException
127+ from seleniumbase .common import exceptions
127128
128129 if exception == Exception :
129130 exc = Exception
130131 return exc , message
131132 elif exception == ElementNotVisibleException :
132- exc = ElementNotVisibleException
133+ exc = exceptions . ElementNotVisibleException
133134 elif exception == "ElementNotVisibleException" :
134- exc = ElementNotVisibleException
135+ exc = exceptions . ElementNotVisibleException
135136 elif exception == NoSuchElementException :
136- exc = NoSuchElementException
137+ exc = exceptions . NoSuchElementException
137138 elif exception == "NoSuchElementException" :
138- exc = NoSuchElementException
139+ exc = exceptions . NoSuchElementException
139140 elif exception == TextNotVisibleException :
140- exc = TextNotVisibleException
141+ exc = exceptions . TextNotVisibleException
141142 elif exception == "TextNotVisibleException" :
142- exc = TextNotVisibleException
143+ exc = exceptions . TextNotVisibleException
143144 elif exception == NoAlertPresentException :
144- exc = NoAlertPresentException
145+ exc = exceptions . NoAlertPresentException
145146 elif exception == "NoAlertPresentException" :
146- exc = NoAlertPresentException
147+ exc = exceptions . NoAlertPresentException
147148 elif exception == NoSuchAttributeException :
148- exc = NoSuchAttributeException
149+ exc = exceptions . NoSuchAttributeException
149150 elif exception == "NoSuchAttributeException" :
150- exc = NoSuchAttributeException
151+ exc = exceptions . NoSuchAttributeException
151152 elif exception == NoSuchFrameException :
152- exc = NoSuchFrameException
153+ exc = exceptions . NoSuchFrameException
153154 elif exception == "NoSuchFrameException" :
154- exc = NoSuchFrameException
155+ exc = exceptions . NoSuchFrameException
155156 elif exception == NoSuchWindowException :
156- exc = NoSuchWindowException
157+ exc = exceptions . NoSuchWindowException
157158 elif exception == "NoSuchWindowException" :
158- exc = NoSuchWindowException
159+ exc = exceptions . NoSuchWindowException
159160 elif exception == NoSuchFileException :
160- exc = NoSuchFileException
161+ exc = exceptions . NoSuchFileException
161162 elif exception == "NoSuchFileException" :
162- exc = NoSuchFileException
163+ exc = exceptions . NoSuchFileException
163164 elif type (exception ) is str :
164165 exc = Exception
165166 message = "%s: %s" % (exception , message )
0 commit comments