@@ -81,46 +81,46 @@ def format_exc(exception, message):
8181 from seleniumbase .common .exceptions import TextNotVisibleException
8282 from seleniumbase .common import exceptions
8383
84- if exception == Exception :
84+ if exception is Exception :
8585 exc = Exception
8686 return exc , message
87- elif exception == ElementNotVisibleException :
87+ elif exception is ElementNotVisibleException :
8888 exc = exceptions .ElementNotVisibleException
8989 elif exception == "ElementNotVisibleException" :
9090 exc = exceptions .ElementNotVisibleException
91- elif exception == LinkTextNotFoundException :
91+ elif exception is LinkTextNotFoundException :
9292 exc = exceptions .LinkTextNotFoundException
9393 elif exception == "LinkTextNotFoundException" :
9494 exc = exceptions .LinkTextNotFoundException
95- elif exception == NoSuchElementException :
95+ elif exception is NoSuchElementException :
9696 exc = exceptions .NoSuchElementException
9797 elif exception == "NoSuchElementException" :
9898 exc = exceptions .NoSuchElementException
99- elif exception == TextNotVisibleException :
99+ elif exception is TextNotVisibleException :
100100 exc = exceptions .TextNotVisibleException
101101 elif exception == "TextNotVisibleException" :
102102 exc = exceptions .TextNotVisibleException
103- elif exception == NoAlertPresentException :
103+ elif exception is NoAlertPresentException :
104104 exc = exceptions .NoAlertPresentException
105105 elif exception == "NoAlertPresentException" :
106106 exc = exceptions .NoAlertPresentException
107- elif exception == NoSuchAttributeException :
107+ elif exception is NoSuchAttributeException :
108108 exc = exceptions .NoSuchAttributeException
109109 elif exception == "NoSuchAttributeException" :
110110 exc = exceptions .NoSuchAttributeException
111- elif exception == NoSuchFrameException :
111+ elif exception is NoSuchFrameException :
112112 exc = exceptions .NoSuchFrameException
113113 elif exception == "NoSuchFrameException" :
114114 exc = exceptions .NoSuchFrameException
115- elif exception == NoSuchWindowException :
115+ elif exception is NoSuchWindowException :
116116 exc = exceptions .NoSuchWindowException
117117 elif exception == "NoSuchWindowException" :
118118 exc = exceptions .NoSuchWindowException
119- elif exception == NoSuchFileException :
119+ elif exception is NoSuchFileException :
120120 exc = exceptions .NoSuchFileException
121121 elif exception == "NoSuchFileException" :
122122 exc = exceptions .NoSuchFileException
123- elif exception == NoSuchOptionException :
123+ elif exception is NoSuchOptionException :
124124 exc = exceptions .NoSuchOptionException
125125 elif exception == "NoSuchOptionException" :
126126 exc = exceptions .NoSuchOptionException
0 commit comments