1、显式等待
它指定要查找的节点,然后指定一个最长的等待时间,如果规定时间内加载出来了这个节点,就返回查找的节点;如果规定时间内没有加载出该节点,就抛出超时异常。
from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECbroswer = webdriver.Chrome()broswer.get('https://mon.by import By #定位到此这篇关于Python页面加载的等待方式总结的文章就介绍到这了,更多相关Python页面加载的等待方式内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!