等待新页面加载Selenium Python

发布于 2025-02-10 10:06:18 字数 393 浏览 4 评论 0原文

在以下网站上:

url: https://www.italreno.it/it/it/it/it /destinazioni-orari/orari-treni

更新搜索结果时(选择下拉菜单的另一个元素,因此搜索结果)我需要等待页面加载,但不能完全使用explicitWait,因为它不会等待元素出现,因为它检测到以前的结果中相同的元素。 似乎与睡眠()一起使用,但这不是很有效,因为加载时间取决于结果数字。

有什么建议吗?

From the following website:

URL: https://www.italotreno.it/it/destinazioni-orari/orari-treni

when updating search results (selecting another element of the drop down menu therefore searching for results) I need to wait for the page to load, but can't quite use ExplicitWait as it won't wait for elements to appear because it detects the same elements from the previous results.
Seems to work with sleep() but it's not very efficient, as the loading time depends on the results numerosity.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文