【发布时间】:2020-09-16 07:25:09
【问题描述】:
使用 Selenium/Python 时,我需要等待/暂停直到:style="display:none;" 显示为 <div id="notification"..</div>
点击一个按钮后,显示如下(Loading...)
<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;" 的值)?
因为style=display的页面中有很多<divs>,所以我需要同时等待div的id和style display。
【问题讨论】:
-
您能否提供代码并指定您卡在哪一点?
-
我还没有任何代码可以解决这个问题,我被困在那里了。
标签: python selenium xpath css-selectors display