7th_handle / src /test_sel.py
Adoption's picture
feat: implement sermon message processing and RAG pipeline with Streamlit dashboard and data ingestion tools
0004cda
Raw
History Blame Contribute Delete
832 Bytes
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
options = Options()
options.add_argument('--headless')
driver = webdriver.Chrome(options=options)
driver.get('https://www.messagehub.info/en/messages.do')
# Wait for rows
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, '.dataRow'))
)
# Click first row
row = driver.find_element(By.CSS_SELECTOR, '.dataRow')
row.click()
print("Clicked row")
# Wait for formats pane to update
time.sleep(3)
# Dump right pane HTML
right_pane = driver.find_element(By.ID, 'artifactList')
print(right_pane.get_attribute('outerHTML'))
driver.quit()