如何等待元素包含属性style =“ display:none;”使用Selenium和Python

问题描述 投票:1回答:1

[使用Selenium / Python时,我需要等待/暂停,直到:为style="display:none;"显示<div id="notification"..</div>


单击按钮后,将显示以下内容(正在加载..。]

<div id="notification" class="notification_info" style="opacity: 1; display: inline-block;">Loading...</div>

然后将数据集加载到网页中后,Loading ...消失(通过更改display:none),并且存在以下内容:

<div id="notification" class="notification_info" style="display: none;">Loading...</div>


如何进行(检查或等待style="display: none;"的值)?

因为带有<divs>的页面中有很多style=display,所以我需要同时等待iddivstyle display

python selenium xpath css-selectors display
1个回答
0
投票

单击所需按钮后,将显示文本为Loading...的元素。因此,您将元素HTML DOM视为:

© www.soinside.com 2019 - 2024. All rights reserved.