내용

글번호 1122
작성자 허진경
작성일 2022-06-10 15:08:39
제목 셀레니움 웹드라이버 명시적 대기 예
내용 selenium webdriver expected condition sample -------------------- from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.Chrome("c:/chromedriver") driver.get("https://www.weather.go.kr/w/index.do") element = WebDriverWait(driver, 5).until( EC.presence_of_element_located((By.CSS_SELECTOR, "div#current-weather span.tmp")) ) print(element.text) driver.close()