-1
I need to create a Try except, with two excepts, but do not know how to put the specific error in the first except, the error that appears this below, someone could help me?
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <div class="card-servicos-destaque" ng-style="card.estilo" style="background-color: rgb(237, 28, 36);">...</div> is not clickable at point (136, 346). Other element would receive the click: <div uib-modal-window="modal-window" class="modal fade ng-scope ng-isolate-scope" role="dialog" aria-labelledby="modal-title" aria-describedby="modal-body" index="0" animate="animate" ng-style="{'z-index': 1050 + $$topModalIndex*10, display: 'block'}" tabindex="-1" uib-modal-animation-class="fade" modal-in-class="in" modal-animation="true" style="z-index: 1050; display: block;">...</div>
(Session info: chrome=70.0.3538.67)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.17134 x86_64)
And this:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <button ng-click="vm.irParaHistoricoDeContas()" type="submit" class="btn btn-link btn-lg btn-block ng-scope" id="btnSegundaVia" translate="@APP-PAINEL-INICIAL-2-VIA-DE-CONTA">...</button> is not clickable at point (848, 552). Other element would receive the click: <div uib-modal-window="modal-window" class="modal fade ng-scope ng-isolate-scope" role="dialog" aria-labelledby="modal-title" aria-describedby="modal-body" index="0" animate="animate" ng-style="{'z-index': 1050 + $$topModalIndex*10, display: 'block'}" tabindex="-1" uib-modal-animation-class="fade" modal-in-class="in" modal-animation="true" style="z-index: 1050; display: block;">...</div>
(Session info: chrome=70.0.3538.67)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.17134 x86_64)
I believe it is enough to put the exception after the
except
. In this case the exception would beselenium.common.exceptions.WebDriverException
– pic