Python 接受;“警惕”;谷歌&x27;s页。-蟒蛇硒
我知道如何使用selenium接受页面上的简单警报消息。但是我正在尝试接受下面图片中的框,只是为了删除一条特定的短信,但是Selenium不会将该框识别为警报 我只需要接受,或者单击红色箭头上的“Excluir”按钮 已尝试:Python 接受;“警惕”;谷歌&x27;s页。-蟒蛇硒,python,selenium,Python,Selenium,我知道如何使用selenium接受页面上的简单警报消息。但是我正在尝试接受下面图片中的框,只是为了删除一条特定的短信,但是Selenium不会将该框识别为警报 我只需要接受,或者单击红色箭头上的“Excluir”按钮 已尝试: driver.switch\u to.active\u element() obj=driver.switch_至.alert obj.accept() 页面上“警报”的html代码: 不包括谈话吗? 永久居民的历史使命。Não serápossível rest
driver.switch\u to.active\u element()
obj=driver.switch_至.alert
obj.accept()
不包括谈话吗?
永久居民的历史使命。Não serápossível restaurálo。
取消者
排他性
<div tabindex="0" class="cdk-visually-hidden cdk-focus-trap-anchor" aria-hidden="true"></div>
<mat-dialog-container aria-modal="true" class="mat-dialog-container ng-tns-c66-94 ng-trigger ng-trigger-dialogContainer ng-star-inserted" tabindex="-1" id="mat-dialog-13" role="dialog" aria-labelledby="mat-dialog-title-13" style="transform: none;">
<!---->
<mws-dialog _nghost-bdb-c67="" class="ng-star-inserted">
<div _ngcontent-bdb-c67="">
<h1 _ngcontent-bdb-c67="" class="title mat-dialog-title" mat-dialog-title="" id="mat-dialog-title-13"> Excluir esta conversa? </h1>
<mat-dialog-content _ngcontent-bdb-c67="" class="content mat-dialog-content">
<!---->
<div _ngcontent-bdb-c67="" class="ng-star-inserted" style="">Todo o histórico de mensagens será removido permanentemente. Não será possível restaurá-lo.</div>
<!---->
</mat-dialog-content><mat-dialog-actions _ngcontent-bdb-c67="" class="actions mat-dialog-actions">
<!---->
<button _ngcontent-bdb-c67="" class="action-button cancel mat-focus-indicator mat-button mat-button-base ng-star-inserted" data-e2e-action-button-cancel="" mat-button="" style="">
<span class="mat-button-wrapper"> Cancelar </span>
<span class="mat-button-ripple mat-ripple" matripple=""></span>
<span class="mat-button-focus-overlay"></span>
</button>
<!---->
<button _ngcontent-bdb-c67="" class="action-button confirm mat-focus-indicator mat-button mat-button-base ng-star-inserted" data-e2e-action-button-confirm="" mat-button="" style="">
<span class="mat-button-wrapper"> Excluir </span>
<span class="mat-button-ripple mat-ripple" matripple=""></span>
<span class="mat-button-focus-overlay"></span>
</button>
<!---->
</mat-dialog-actions>
</div>
</mws-dialog></mat-dialog-container>
<div tabindex="0" class="cdk-visually-hidden cdk-focus-trap-anchor" aria-hidden="true"></div>